Issue metadata
Sign in to add a comment
|
GN, cflags -= ["xxx"] Can not remove default cflags
Reported by
sainim...@gmail.com,
Jan 29 2018
|
||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
Steps to reproduce the problem:
executable("NihaoSkia") {
testonly = true
if (is_win) {
cflags -= [
"/WX", # Treat warnings as errors.
]
}
defines = [
"WIN32"
]
sources = [
"HelloWorld.cpp",
]
include_dirs = [
"E:\Fts\Proj\Test\DFVision_Proj\DFVisionConsole_Common\include",
]
deps = [
"//:flags",
"//:gpu_tool_utils",
"//:sk_app",
"//:skia",
"//:tool_utils",
"//:views",
]
# ldflags -= [ "/SUBSYSTEM:CONSOLE" ]
# ldflags += [ "/SUBSYSTEM:WINDOWS" ]
}
---------------------------------
I'm using -= oporator in my BUILD.gn, I want to remove some default cflags and ldflags, but "-=" does not work.
What is the expected behavior?
cflags -= ["xxx"] operation removes "xxx" from inherited cflags
What went wrong?
The error messages:
ERROR at //NihaoSkia/src/BUILD.gn:8:5: Undefined identifier.
cflags -= [
^-----
See //BUILD.gn:2017:5: which caused the file to be included.
"//NihaoSkia/src:NihaoSkia",
^--------------------------
ninja: error: rebuilding 'build.ninja': subcommand failed
Did this work before? N/A
Chrome version: 60.0.3112.90 Channel: n/a
OS Version: 10.0
Flash Version:
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by dtapu...@chromium.org
, Jan 30 2018Status: Duplicate (was: Unconfirmed)