summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-11-21 15:51:48 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-15 03:54:02 -0500
commitd97aa311f61f3e5a61a4d204550792f458bf236d (patch)
tree862058fbd7b8db5b8316105ad432cfd375310bdd
parent28c6781a3215a36d61126818c3e64c99c2344350 (diff)
downloadhaskell-d97aa311f61f3e5a61a4d204550792f458bf236d.tar.gz
Hadrian: Drop TSAN_ENABLED define from flavour
This is redundant since the TSANUtils.h already defines it.
-rw-r--r--hadrian/src/Flavour.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs
index 2ae5334323..c84ffba545 100644
--- a/hadrian/src/Flavour.hs
+++ b/hadrian/src/Flavour.hs
@@ -203,12 +203,14 @@ splitSections = splitSectionsIf (/=ghc)
-- Disable section splitting for the GHC library. It takes too long and
-- there is little benefit.
+-- | Build GHC and libraries with ThreadSanitizer support. You likely want to
+-- configure with @--disable-large-address-space@ when using this.
enableThreadSanitizer :: Flavour -> Flavour
enableThreadSanitizer = addArgs $ notStage0 ? mconcat
[ builder (Ghc CompileHs) ? arg "-optc-fsanitize=thread"
- , builder (Ghc CompileCWithGhc) ? (arg "-optc-fsanitize=thread" <> arg "-DTSAN_ENABLED")
- , builder (Ghc LinkHs) ? arg "-optl-fsanitize=thread"
- , builder (Cc CompileC) ? (arg "-fsanitize=thread" <> arg "-DTSAN_ENABLED")
+ , builder (Ghc CompileCWithGhc) ? arg "-optc-fsanitize=thread"
+ , builder (Ghc LinkHs) ? (arg "-optc-fsanitize=thread" <> arg "-optl-fsanitize=thread")
+ , builder Cc ? arg "-fsanitize=thread"
, builder (Cabal Flags) ? arg "thread-sanitizer"
, builder Testsuite ? arg "--config=have_thread_sanitizer=True"
]