kcsan: Pass option tsan-instrument-read-before-write to Clang
[linux-2.6-microblaze.git] / scripts / Makefile.kcsan
index 75d2942..bd4da1a 100644 (file)
@@ -13,6 +13,7 @@ endif
 # of some options does not break KCSAN nor causes false positive reports.
 CFLAGS_KCSAN := -fsanitize=thread \
        $(call cc-option,$(call cc-param,tsan-instrument-func-entry-exit=0) -fno-optimize-sibling-calls) \
+       $(call cc-option,$(call cc-param,tsan-instrument-read-before-write=1)) \
        $(call cc-param,tsan-distinguish-volatile=1)
 
 endif # CONFIG_KCSAN