[llvm] b35b629 - [gn build] Build win asan libraries against MutliThreadedDLL

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 19 12:52:34 PDT 2025


Author: Arthur Eubanks
Date: 2025-08-19T19:48:32Z
New Revision: b35b6297fd5193e10e0c57d3371f7326fbd40ae3

URL: https://github.com/llvm/llvm-project/commit/b35b6297fd5193e10e0c57d3371f7326fbd40ae3
DIFF: https://github.com/llvm/llvm-project/commit/b35b6297fd5193e10e0c57d3371f7326fbd40ae3.diff

LOG: [gn build] Build win asan libraries against MutliThreadedDLL

win asan only supports /MD. Without this, the asan runtime cannot intercept functions.

Added: 
    

Modified: 
    llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn
index 42467c21aa24c..1d24d049a0ae4 100644
--- a/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn
+++ b/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn
@@ -68,6 +68,7 @@ if (current_toolchain == host_toolchain) {
     if (current_os != "win") {
       cflags += [ "-ftls-model=initial-exec" ]
     } else {
+      cflags += [ "/MD" ]
       ldflags = [ "/OPT:NOICF" ]
     }
 


        


More information about the llvm-commits mailing list