summaryrefslogtreecommitdiff
path: root/ci/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/run.sh')
-rwxr-xr-xci/run.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/ci/run.sh b/ci/run.sh
index e39cc44b..d1ac5ad9 100755
--- a/ci/run.sh
+++ b/ci/run.sh
@@ -27,6 +27,17 @@ configure_cargo() {
cp "${BASE_DIR}/ci/cargo-config" .cargo/config
}
+#
+# We need to export CC for the tests to build properly (some C code is
+# compiled) to work. We already tell Cargo about the compiler in the
+# cargo config, so we just parse that info out of the cargo config
+#
+cc_for_target() {
+ awk "/\[target\.${TARGET}\]/{getline; print}" .cargo/config |
+ cut -d '=' -f2 | \
+ tr -d '"' | tr -d ' '
+}
+
cross_compile_tests() {
case "$TARGET" in
*-apple-ios)
@@ -99,6 +110,8 @@ test_binary() {
configure_cargo
+export CC="$(cc_for_target)"
+
# select the proper version
multirust override ${VERSION}