Since the integer wrapping sanitizer's behavior depends on its associated .scl file, we must force a full rebuild if the file changes. If not, instrumentation may differ between targets based on when they were built. Generate a new header file, integer-wrap.h, any time the Clang .scl file changes. Include the header file in compiler-version.h when its associated feature name, INTEGER_WRAP, is defined. This will be picked up by fixdep and force rebuilds where needed.
Showing the changes to scripts/basic (1 of 3 files). Show all
Unified · Split
| @@ -14,3 +14,8 @@ cmd_create_randstruct_seed = \ · 13 unmodified lines | |||
| 14 | $(obj)/randstruct.seed: $(gen-randstruct-seed) FORCE | 14 | $(obj)/randstruct.seed: $(gen-randstruct-seed) FORCE |
| 15 | $(call if_changed,create_randstruct_seed) | 15 | $(call if_changed,create_randstruct_seed) |
| 16 | always-$(CONFIG_RANDSTRUCT) += randstruct.seed | 16 | always-$(CONFIG_RANDSTRUCT) += randstruct.seed |
| 17 | |||
| 18 | # integer-wrap: if the .scl file changes, we need to do a full rebuild. | ||
| 19 | $(obj)/../../include/generated/integer-wrap.h: $(srctree)/scripts/integer-wrap-ignore.scl FORCE | ||
| 20 | $(call if_changed,touch) | ||
| 21 | always-$(CONFIG_UBSAN_INTEGER_WRAP) += ../../include/generated/integer-wrap.h | ||