Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: build/toolchain/gcc_toolchain.gni

Issue 2202873002: Rework approach to allowing extra flags for CrOS builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_cros_nacl_bootstrap_args
Patch Set: fix typos, type checking Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/toolchain/cros/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/gcc_toolchain.gni
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni
index eecb409a71c35d58e5461b356139785fa1d82bba..428f27427d5f0dd80cf2b7f5c94d6f9027b53d7a 100644
--- a/build/toolchain/gcc_toolchain.gni
+++ b/build/toolchain/gcc_toolchain.gni
@@ -21,18 +21,6 @@ import("//build/toolchain/toolchain.gni")
#
# Optional parameters that control the tools:
#
-# - extra_cflags
-# Extra flags to be appended when compiling C files (but not C++ files).
-# - extra_cppflags
-# Extra flags to be appended when compiling both C and C++ files. "CPP"
-# stands for "C PreProcessor" in this context, although it can be
-# used for non-preprocessor flags as well. Not to be confused with
-# "CXX" (which follows).
-# - extra_cxxflags
-# Extra flags to be appended when compiling C++ files (but not C files).
-# - extra_ldflags
-# Extra flags to be appended when linking
-#
# - libs_section_prefix
# - libs_section_postfix
# The contents of these strings, if specified, will be placed around
@@ -188,30 +176,6 @@ template("gcc_toolchain") {
solink_libs_section_postfix = ""
}
- if (defined(invoker.extra_cflags) && invoker.extra_cflags != "") {
- extra_cflags = " " + invoker.extra_cflags
- } else {
- extra_cflags = ""
- }
-
- if (defined(invoker.extra_cppflags) && invoker.extra_cppflags != "") {
- extra_cppflags = " " + invoker.extra_cppflags
- } else {
- extra_cppflags = ""
- }
-
- if (defined(invoker.extra_cxxflags) && invoker.extra_cxxflags != "") {
- extra_cxxflags = " " + invoker.extra_cxxflags
- } else {
- extra_cxxflags = ""
- }
-
- if (defined(invoker.extra_ldflags) && invoker.extra_ldflags != "") {
- extra_ldflags = " " + invoker.extra_ldflags
- } else {
- extra_ldflags = ""
- }
-
# These library switches can apply to all tools below.
lib_switch = "-l"
lib_dir_switch = "-L"
@@ -221,7 +185,7 @@ template("gcc_toolchain") {
tool("cc") {
depfile = "{{output}}.d"
- command = "$cc -MMD -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}${extra_cppflags}${extra_cflags} -c {{source}} -o {{output}}"
+ command = "$cc -MMD -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}"
depsformat = "gcc"
description = "CC {{output}}"
outputs = [
@@ -231,7 +195,7 @@ template("gcc_toolchain") {
tool("cxx") {
depfile = "{{output}}.d"
- command = "$cxx -MMD -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}${extra_cppflags}${extra_cxxflags} -c {{source}} -o {{output}}"
+ command = "$cxx -MMD -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}"
depsformat = "gcc"
description = "CXX {{output}}"
outputs = [
@@ -290,7 +254,7 @@ template("gcc_toolchain") {
# .TOC file, overwrite it, otherwise, don't change it.
tocfile = sofile + ".TOC"
- link_command = "$ld -shared {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" -Wl,-soname=\"$soname\" @\"$rspfile\""
+ link_command = "$ld -shared {{ldflags}} -o \"$unstripped_sofile\" -Wl,-soname=\"$soname\" @\"$rspfile\""
assert(defined(readelf), "to solink you must have a readelf")
assert(defined(nm), "to solink you must have an nm")
@@ -351,7 +315,7 @@ template("gcc_toolchain") {
unstripped_sofile = sofile
}
- command = "$ld -shared {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" -Wl,-soname=\"$soname\" @\"$rspfile\""
+ command = "$ld -shared {{ldflags}} -o \"$unstripped_sofile\" -Wl,-soname=\"$soname\" @\"$rspfile\""
if (defined(invoker.strip)) {
strip_command = "${invoker.strip} --strip-unneeded -o \"$sofile\" \"$unstripped_sofile\""
@@ -403,7 +367,7 @@ template("gcc_toolchain") {
unstripped_outfile = "{{root_out_dir}}/exe.unstripped/$exename"
}
- command = "$ld {{ldflags}}${extra_ldflags} -o \"$unstripped_outfile\" -Wl,--start-group @\"$rspfile\" {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix"
+ command = "$ld {{ldflags}} -o \"$unstripped_outfile\" -Wl,--start-group @\"$rspfile\" {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix"
if (defined(invoker.strip)) {
link_wrapper =
rebase_path("//build/toolchain/gcc_link_wrapper.py", root_build_dir)
« no previous file with comments | « build/toolchain/cros/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698