Skip to content

Add ability to have include_directories before CFLAGS #1020

@WesleyRosenblum

Description

@WesleyRosenblum

Currently , the contents of any CFLAGS or CXXFLAGS environment variables are added to the build cmd prior to include_directories that had been added using fn include:

cc-rs/src/lib.rs

Lines 1766 to 1770 in be62f4a

if let Ok(flags) = self.envflags(if self.cpp { "CXXFLAGS" } else { "CFLAGS" }) {
for arg in flags {
cmd.push_cc_arg(arg.into());
}
}

This can result in conflicts if the specified includes need to come prior to the CFLAGS includes.

We've worked around this by manually prepending includes to CFLAGS (see aws/s2n-tls#4338), but it would be preferable for this to be configurable in cc.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions