Skip to content

Insert user-provided CFLAGS at the end of the command line #376

@mephi42

Description

@mephi42

I'm trying to build libsqlite3-sys, which uses cc-rs on Windows, and I am running into a gcc internal compiler error. Since it happens in the DWARF area of the compiler, I would like to switch off the debug info generation. In order to do that, I set CFLAGS=-g0, however, this results in the following command line:

running: "gcc.exe" "-O3" "-ffunction-sections" "-fdata-sections" "-g0" "-g" "-fno-omit-frame-pointer" "-m64" "-DSQLITE_CORE" "-DSQLITE_DEFAULT_FOREIGN_KEYS=1" "-DSQLITE_ENABLE_API_ARMOR" "-DSQLITE_ENABLE_COLUMN_METADATA" "-DSQLITE_ENABLE_DBSTAT_VTAB" "-DSQLITE_ENABLE_FTS3" "-DSQLITE_ENABLE_FTS3_PARENTHESIS" "-DSQLITE_ENABLE_FTS5" "-DSQLITE_ENABLE_JSON1" "-DSQLITE_ENABLE_LOAD_EXTENSION=1" "-DSQLITE_ENABLE_MEMORY_MANAGEMENT" "-DSQLITE_ENABLE_RTREE" "-DSQLITE_ENABLE_STAT2" "-DSQLITE_ENABLE_STAT4" "-DSQLITE_HAVE_ISNAN" "-DSQLITE_SOUNDEX" "-DSQLITE_THREADSAFE=1" "-DSQLITE_USE_URI" "-DHAVE_USLEEP=1" "-o" "<redacted>/sqlite3.o" "-c" "sqlite3/sqlite3.c"

Note that my -g0 comes before the automatically inserted -g - this leads to it being completely ignored. To me, one of the points of having CFLAGS is to be able to insert overrides like this one. Would it be possible to insert user-provided CFLAGS at the end of the command line?

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