Skip to content

Commit fe65094

Browse files
committed
Disable PIC on Windows
1 parent 46871b9 commit fe65094

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,7 @@ fn build_compiler(opencv: &Library) -> cc::Build {
974974
.flag_if_supported("-wd4190") // has C-linkage specified, but returns UDT 'Result<cv::Rect_<int>>' which is incompatible with C
975975
.flag_if_supported("-EHsc")
976976
.flag_if_supported("-bigobj")
977+
.pic(false)
977978
;
978979
} else {
979980
out.flag("-std=c++11")

ci/script.sh

+4-7
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ cargo test --release -vv --no-default-features --features "$CARGO_FEATURES"
6060

6161
cargo test --release -vv --no-default-features --features "$CARGO_FEATURES,clang-runtime"
6262

63-
# on windows clang through `cc` crate fails because of -fPIC flag
64-
if [[ "$OS_FAMILY" != "windows" ]]; then
65-
export CXX=clang++
66-
touch build.rs
67-
cargo test -vv --no-default-features --features "$CARGO_FEATURES"
68-
cargo test --release -vv --no-default-features --features "$CARGO_FEATURES"
69-
fi
63+
export CXX=clang++
64+
touch build.rs
65+
cargo test -vv --no-default-features --features "$CARGO_FEATURES"
66+
cargo test --release -vv --no-default-features --features "$CARGO_FEATURES"

0 commit comments

Comments
 (0)