Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make user-specified cflags take precedence over cc-rs flags #232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Jan 27, 2025

When the user uses .cflag/.cxxflag/.asmflag, we want those flags to take precedence over the default flags that cc-rs adds.

@madsmtm madsmtm force-pushed the user-specified-takes-precedence branch from 056a6ea to 4e9ce56 Compare January 27, 2025 01:25
@madsmtm
Copy link
Contributor Author

madsmtm commented Jan 27, 2025

The nightly error is rust-lang/rust#136086, will be fixed by rust-lang/rust#136098.

@jyn514
Copy link
Member

jyn514 commented Jan 27, 2025

for posterity, the full error was

   Compiling test-crate v0.1.0 (/Users/runner/work/cmake-rs/cmake-rs/test-crate)
error: linker stderr: ld: search path '/Users/runner/work/cmake-rs/cmake-rs/test-crate/target/debug/build/libz-sys-ae8c893dbe111c55/out/lib64' not found
       ld: object file (/Users/runner/work/cmake-rs/cmake-rs/test-crate/target/debug/deps/liblibz_sys-297f35bb33641431.rlib[31](zutil.c.o)) was built for newer 'macOS' version (14.5) than being linked (11.0)
  |
  = note: `-D linker-messages` implied by `-D warnings`
  = help: to override `-D warnings` add `#[allow(linker_messages)]`

(CI logs go away after about 3 months)

@jyn514
Copy link
Member

jyn514 commented Jan 27, 2025

note that i do not plan to silence the "search path" not found error, so that will eventually come back unless someone makes a convincing case why it shouldn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants