[Git][ghc/ghc][wip/tsan/codegen] 2 commits: Hadrian: Drop TSAN_ENABLED define from flavour

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Tue Nov 22 13:49:42 UTC 2022



Ben Gamari pushed to branch wip/tsan/codegen at Glasgow Haskell Compiler / GHC


Commits:
dbbc382f by Ben Gamari at 2022-11-21T15:51:48-05:00
Hadrian: Drop TSAN_ENABLED define from flavour

This is redundant since the TSANUtils.h already defines it.

- - - - -
18993c8c by Ben Gamari at 2022-11-22T08:49:38-05:00
hadrian: Enable Cmm instrumentation in TSAN flavour

- - - - -


1 changed file:

- hadrian/src/Flavour.hs


Changes:

=====================================
hadrian/src/Flavour.hs
=====================================
@@ -196,12 +196,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 CompileHs) ? (arg "-optc-fsanitize=thread" <> arg "-fcmm-thread-sanitizer")
+    , 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"
     ]



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9f545dc8dfb0dbeea19a27a2e4af823dc5831cb4...18993c8c8c5c49976d83edfc7914f27e09ba5b10

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9f545dc8dfb0dbeea19a27a2e4af823dc5831cb4...18993c8c8c5c49976d83edfc7914f27e09ba5b10
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221122/f976401f/attachment-0001.html>


More information about the ghc-commits mailing list