@@ -22,22 +22,21 @@ fn main() {
22
22
23
23
let target = env:: var ( "TARGET" ) . expect ( "TARGET was not set" ) ;
24
24
let llvm_config = env:: var_os ( "LLVM_CONFIG" )
25
- . map ( PathBuf :: from)
26
- . unwrap_or_else ( || {
27
- if let Some ( dir) = env:: var_os ( "CARGO_TARGET_DIR" )
28
- . map ( PathBuf :: from) {
29
- let to_test = dir. parent ( )
30
- . unwrap ( )
31
- . parent ( )
32
- . unwrap ( )
33
- . join ( & target)
34
- . join ( "llvm/bin/llvm-config" ) ;
35
- if Command :: new ( & to_test) . output ( ) . is_ok ( ) {
36
- return to_test;
37
- }
38
- }
39
- PathBuf :: from ( "llvm-config" )
40
- } ) ;
25
+ . map ( PathBuf :: from)
26
+ . unwrap_or_else ( || {
27
+ if let Some ( dir) = env:: var_os ( "CARGO_TARGET_DIR" ) . map ( PathBuf :: from) {
28
+ let to_test = dir. parent ( )
29
+ . unwrap ( )
30
+ . parent ( )
31
+ . unwrap ( )
32
+ . join ( & target)
33
+ . join ( "llvm/bin/llvm-config" ) ;
34
+ if Command :: new ( & to_test) . output ( ) . is_ok ( ) {
35
+ return to_test;
36
+ }
37
+ }
38
+ PathBuf :: from ( "llvm-config" )
39
+ } ) ;
41
40
42
41
println ! ( "cargo:rerun-if-changed={}" , llvm_config. display( ) ) ;
43
42
@@ -66,8 +65,8 @@ fn main() {
66
65
let host = env:: var ( "HOST" ) . expect ( "HOST was not set" ) ;
67
66
let is_crossed = target != host;
68
67
69
- let optional_components = [ "x86" , "arm" , "aarch64" , "mips" , "powerpc" , "pnacl" , "systemz" ,
70
- "jsbackend" ] ;
68
+ let optional_components =
69
+ [ "x86" , "arm" , "aarch64" , "mips" , "powerpc" , "pnacl" , "systemz" , "jsbackend" ] ;
71
70
72
71
// FIXME: surely we don't need all these components, right? Stuff like mcjit
73
72
// or interpreter the compiler itself never uses.
@@ -149,7 +148,7 @@ fn main() {
149
148
// that off
150
149
lib. trim_right_matches ( ".lib" )
151
150
} else {
152
- continue
151
+ continue ;
153
152
} ;
154
153
155
154
// Don't need or want this library, but LLVM's CMake build system
@@ -158,7 +157,7 @@ fn main() {
158
157
// library and it otherwise may just pull in extra dependencies on
159
158
// libedit which we don't want
160
159
if name == "LLVMLineEditor" {
161
- continue
160
+ continue ;
162
161
}
163
162
164
163
let kind = if name. starts_with ( "LLVM" ) {
@@ -179,7 +178,7 @@ fn main() {
179
178
cmd. arg ( "--ldflags" ) ;
180
179
for lib in output ( & mut cmd) . split_whitespace ( ) {
181
180
if lib. starts_with ( "-LIBPATH:" ) {
182
- println ! ( "cargo:rustc-link-search=native={}" , & lib[ 9 ..] ) ;
181
+ println ! ( "cargo:rustc-link-search=native={}" , & lib[ 9 ..] ) ;
183
182
} else if is_crossed {
184
183
if lib. starts_with ( "-L" ) {
185
184
println ! ( "cargo:rustc-link-search=native={}" ,
0 commit comments