Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Pick up LDFLAGS and CPPFLAGS from environment #10

Merged
merged 1 commit into from
Aug 11, 2018

Conversation

henrycg
Copy link
Collaborator

@henrycg henrycg commented Aug 10, 2018

No description provided.

@rhelmer
Copy link
Contributor

rhelmer commented Aug 11, 2018

Hm, adding LDFLAGS to CFLAGS doesn't seem to do the trick:

$ scons
scons: Reading SConscript files ...
DEBUG MODE!
scons: done reading SConscript files.
scons: Building targets ...
gcc -o build/browser-test/main.o -c -I/usr/local/opt/nss/include -I/usr/local/opt/nspr/include/nspr -L/usr/local/opt/nss/lib -Wall -Werror -Wextra -O3 -std=c99 -I/usr/include/nspr -DDO_PR_CLEANUP -g -DDEBUG -Iinclude -I. build/browser-test/main.c
clang: error: argument unused during compilation: '-L/usr/local/opt/nss/lib' [-Werror,-Wunused-command-line-argument]
scons: *** [build/browser-test/main.o] Error 1
scons: building terminated because of errors

Looks like you want:

if "LDFLAGS" in os.environ:
  env.Append(LINKFLAGS = SCons.Util.CLVar(os.getenv("LDFLAGS")))

That WFM

@henrycg
Copy link
Collaborator Author

henrycg commented Aug 11, 2018

Whoops. That was a copy-paste typo. I just pushed an updated version with this fix.

@rhelmer
Copy link
Contributor

rhelmer commented Aug 11, 2018

Nice, thanks!

@rhelmer rhelmer merged commit e9920b2 into mozilla:master Aug 11, 2018
@henrycg henrycg deleted the scons branch August 26, 2018 15:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants