File tree Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -112,28 +112,10 @@ fn main() {
112112
113113 restore_library_path ( ) ;
114114
115- let target = env:: var ( "TARGET" ) . expect ( "TARGET was not set" ) ;
116115 let llvm_config =
117- tracked_env_var_os ( "LLVM_CONFIG" ) . map ( |x| Some ( PathBuf :: from ( x) ) ) . unwrap_or_else ( || {
118- if let Some ( dir) = tracked_env_var_os ( "CARGO_TARGET_DIR" ) . map ( PathBuf :: from) {
119- let to_test = dir
120- . parent ( )
121- . unwrap ( )
122- . parent ( )
123- . unwrap ( )
124- . join ( & target)
125- . join ( "llvm/bin/llvm-config" ) ;
126- if Command :: new ( & to_test) . output ( ) . is_ok ( ) {
127- return Some ( to_test) ;
128- }
129- }
130- None
131- } ) ;
116+ PathBuf :: from ( tracked_env_var_os ( "LLVM_CONFIG" ) . expect ( "LLVM_CONFIG was not set" ) ) ;
132117
133- if let Some ( llvm_config) = & llvm_config {
134- println ! ( "cargo:rerun-if-changed={}" , llvm_config. display( ) ) ;
135- }
136- let llvm_config = llvm_config. unwrap_or_else ( || PathBuf :: from ( "llvm-config" ) ) ;
118+ println ! ( "cargo:rerun-if-changed={}" , llvm_config. display( ) ) ;
137119
138120 // Test whether we're cross-compiling LLVM. This is a pretty rare case
139121 // currently where we're producing an LLVM for a different platform than
You can’t perform that action at this time.
0 commit comments