File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -42,17 +42,17 @@ fn main() {
42
42
. expect ( "Failed to run `make`" ) ;
43
43
assert ! ( result. success( ) ) ;
44
44
println ! ( "cargo:rustc-link-search=native={}/js/src" , out_dir) ;
45
+ println ! ( "cargo:rustc-link-lib=static=js_static" ) ; // Must come before c++
45
46
if target. contains ( "windows" ) {
46
47
println ! ( "cargo:rustc-link-lib=winmm" ) ;
47
48
println ! ( "cargo:rustc-link-lib=psapi" ) ;
48
49
if target. contains ( "gnu" ) {
49
50
println ! ( "cargo:rustc-link-lib=stdc++" ) ;
50
51
}
51
- } else if target. contains ( "apple" ) {
52
+ } else if target. contains ( "apple" ) || target . contains ( "freebsd" ) {
52
53
println ! ( "cargo:rustc-link-lib=c++" ) ;
53
54
} else {
54
55
println ! ( "cargo:rustc-link-lib=stdc++" ) ;
55
56
}
56
- println ! ( "cargo:rustc-link-lib=static=js_static" ) ;
57
57
println ! ( "cargo:outdir={}" , out_dir) ;
58
58
}
Original file line number Diff line number Diff line change @@ -39,9 +39,16 @@ CONFIGURE_FLAGS += --target=$(TARGET) --disable-gold
39
39
else
40
40
41
41
ifeq (,$(VCINSTALLDIR))
42
- CC ?= gcc
43
- CPP ?= gcc -E
44
- CXX ?= g++
42
+ ifeq (freebsd,$(findstring freebsd,$(TARGET)))
43
+ # Does not symlink clang as "gcc" like macOS does
44
+ CC ?= clang
45
+ CPP ?= clang -E
46
+ CXX ?= clang++
47
+ else
48
+ CC ?= gcc
49
+ CPP ?= gcc -E
50
+ CXX ?= g++
51
+ endif
45
52
AR ?= ar
46
53
PYTHON ?= python
47
54
endif
You can’t perform that action at this time.
0 commit comments