rust-lang / cc-rs

Rust library for build scripts to compile C/C++ code into a Rust library
https://docs.rs/cc
Apache License 2.0
1.77k stars 427 forks source link

Use specified include directories prior to CFLAGS #1043

Closed justsmth closed 2 months ago

justsmth commented 2 months ago

Issues

See:

Problem

The header files in the directories provided via CFLAGS can conflict with the specific headers needed for the project being built. The include files specified by the project should take precedence over those provided via CFLAGS.

Proposed change

A simple re-ordering of the arguments to add the specified include directories prior to those in CFLAGS.