File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 8282#  passed to prefer linking to shared libraries.
8383# link-shared = false
8484
85+ #  When building llvm, this configures what is being appended to the version.
86+ #  If absent, we let the version as-is.
87+ # version-suffix = "-rust"
88+ 
8589#  On MSVC you can compile LLVM with clang-cl, but the test suite doesn't pass
8690#  with clang-cl, so this is special in that it only compiles LLVM with clang-cl
8791# clang-cl = '/path/to/clang-cl.exe'
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ pub struct Config {
8686    pub  llvm_targets :  Option < String > , 
8787    pub  llvm_experimental_targets :  String , 
8888    pub  llvm_link_jobs :  Option < u32 > , 
89+     pub  llvm_version_suffix :  Option < String > , 
8990
9091    pub  lld_enabled :  bool , 
9192    pub  lldb_enabled :  bool , 
@@ -256,6 +257,7 @@ struct Llvm {
256257    experimental_targets :  Option < String > , 
257258    link_jobs :  Option < u32 > , 
258259    link_shared :  Option < bool > , 
260+     version_suffix :  Option < String > , 
259261    clang_cl :  Option < String > 
260262} 
261263
@@ -516,6 +518,7 @@ impl Config {
516518            config. llvm_experimental_targets  = llvm. experimental_targets . clone ( ) 
517519                . unwrap_or ( "WebAssembly;RISCV" . to_string ( ) ) ; 
518520            config. llvm_link_jobs  = llvm. link_jobs ; 
521+             config. llvm_version_suffix  = llvm. version_suffix . clone ( ) ; 
519522            config. llvm_clang_cl  = llvm. clang_cl . clone ( ) ; 
520523        } 
521524
Original file line number Diff line number Diff line change @@ -239,6 +239,10 @@ impl Step for Llvm {
239239            cfg. define ( "LLVM_NATIVE_BUILD" ,  builder. llvm_out ( builder. config . build ) . join ( "build" ) ) ; 
240240        } 
241241
242+         if  let  Some ( ref  suffix)  = builder. config . llvm_version_suffix  { 
243+             cfg. define ( "LLVM_VERSION_SUFFIX" ,  suffix) ; 
244+         } 
245+ 
242246        if  let  Some ( ref  python)  = builder. config . python  { 
243247            cfg. define ( "PYTHON_EXECUTABLE" ,  python) ; 
244248        } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments