File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -125,11 +125,19 @@ impl Step for Llvm {
125125 . define ( "WITH_POLLY" , "OFF" )
126126 . define ( "LLVM_ENABLE_TERMINFO" , "OFF" )
127127 . define ( "LLVM_ENABLE_LIBEDIT" , "OFF" )
128- . define ( "LLVM_LINK_LLVM_DYLIB" , "ON" )
129128 . define ( "LLVM_PARALLEL_COMPILE_JOBS" , build. jobs ( ) . to_string ( ) )
130129 . define ( "LLVM_TARGET_ARCH" , target. split ( '-' ) . next ( ) . unwrap ( ) )
131130 . define ( "LLVM_DEFAULT_TARGET_TRIPLE" , target) ;
132131
132+
133+ // This setting makes the LLVM tools link to the dynamic LLVM library,
134+ // which saves both memory during parallel links and overall disk space
135+ // for the tools. We don't distribute any of those tools, so this is
136+ // just a local concern. However, this doesn't seem to work on Windows.
137+ if !target. contains ( "windows" ) {
138+ cfg. define ( "LLVM_LINK_LLVM_DYLIB" , "ON" ) ;
139+ }
140+
133141 if target. contains ( "msvc" ) {
134142 cfg. define ( "LLVM_USE_CRT_DEBUG" , "MT" ) ;
135143 cfg. define ( "LLVM_USE_CRT_RELEASE" , "MT" ) ;
You can’t perform that action at this time.
0 commit comments