Commit 7d6271b 1 parent 8a87b94 commit 7d6271b Copy full SHA for 7d6271b
File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,8 @@ impl Step for Llvm {
230
230
cfg. define ( "CMAKE_SYSTEM_NAME" , "NetBSD" ) ;
231
231
} else if target. contains ( "freebsd" ) {
232
232
cfg. define ( "CMAKE_SYSTEM_NAME" , "FreeBSD" ) ;
233
+ } else if target. contains ( "windows" ) {
234
+ cfg. define ( "CMAKE_SYSTEM_NAME" , "Windows" ) ;
233
235
}
234
236
235
237
cfg. define ( "LLVM_NATIVE_BUILD" , builder. llvm_out ( builder. config . build ) . join ( "build" ) ) ;
Original file line number Diff line number Diff line change @@ -215,12 +215,14 @@ fn main() {
215
215
let mut cmd = Command :: new ( & llvm_config) ;
216
216
cmd. arg ( llvm_link_arg) . arg ( "--ldflags" ) ;
217
217
for lib in output ( & mut cmd) . split_whitespace ( ) {
218
- if lib . starts_with ( "-LIBPATH:" ) {
219
- println ! ( "cargo:rustc-link-search=native={}" , & lib [ 9 .. ] ) ;
220
- } else if is_crossed {
221
- if lib. starts_with ( "-L" ) {
218
+ if is_crossed {
219
+ if lib . starts_with ( "-LIBPATH:" ) {
220
+ println ! ( "cargo:rustc-link-search=native={}" , lib [ 9 .. ] . replace ( & host , & target ) ) ;
221
+ } else if lib. starts_with ( "-L" ) {
222
222
println ! ( "cargo:rustc-link-search=native={}" , lib[ 2 ..] . replace( & host, & target) ) ;
223
223
}
224
+ } else if lib. starts_with ( "-LIBPATH:" ) {
225
+ println ! ( "cargo:rustc-link-search=native={}" , & lib[ 9 ..] ) ;
224
226
} else if lib. starts_with ( "-l" ) {
225
227
println ! ( "cargo:rustc-link-lib={}" , & lib[ 2 ..] ) ;
226
228
} else if lib. starts_with ( "-L" ) {
You can’t perform that action at this time.
0 commit comments