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

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

Closed
mephi42 opened this issue Feb 26, 2019 · 2 comments
Closed

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

mephi42 opened this issue Feb 26, 2019 · 2 comments

Comments

@mephi42
Copy link

mephi42 commented Feb 26, 2019

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?

@GeorgeHahn
Copy link
Contributor

This should be fixed in version 1.0.30 - libsqlite3-sys should pull this version in automatically.

@alexcrichton
Copy link
Member

Closing since this should be fixed!

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

No branches or pull requests

3 participants