Skip to content

Commit 070f722

Browse files
tautschnigNlightNFotis
authored andcommitted
Fix libstdc++-not-found error
See https://github.com/diffblue/cbmc/actions/runs/6856483568/job/18643716705?pr=6749 for one example of the failure: cargo-induced clang runs (via the cc crate) weren't finding the C++ library (which ought to be libc++ and not libstdc++ on this MacOS target). This appears to be caused by the minimum build target being too low (where the cc crate is the one setting that minimum). Override that by setting an environment variable. See https://github.com/rust-lang/cc-rs/blob/2d6a3b2119cf5eacc01e1f2877e064a7aede7819/src/lib.rs#L3497C52-L3497C76 for the Rust code implementing the logic.
1 parent 38c5ad8 commit 070f722

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/pull-request-check-rust-api.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
# (https://docs.rs/cc/latest/cc/struct.Build.html#method.cpp_link_stdlib)
109109
CXXSTDLIB: c++
110110
run: |
111+
export MACOSX_DEPLOYMENT_TARGET=10.15
111112
VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))")
112113
cd src/libcprover-rust;\
113114
cargo clean;\

0 commit comments

Comments
 (0)