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

Unified Diff: build/toolchain/gcc_toolchain.gni

Issue 1281523004: Add readelf and nm dummy values to cros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Provide central default for readelf and nm. Created 5 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 | « no previous file | 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 3421a9575bda75ed497f57cf2ec3b7e8b3587123..29b913759653962261e3e3d585c30dee95e2fa07 100644
--- a/build/toolchain/gcc_toolchain.gni
+++ b/build/toolchain/gcc_toolchain.gni
@@ -13,8 +13,6 @@ concurrent_links = exec_script("get_concurrent_links.py", [], "value")
# - cxx
# - ar
# - ld
-# - readelf
-# - nm
# and the following which is used in the toolchain_args
# - toolchain_cpu (What "current_cpu" should be set to when invoking a
# build using this toolchain.)
@@ -42,9 +40,6 @@ template("gcc_toolchain") {
assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value")
assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value")
assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value")
- assert(defined(invoker.readelf),
- "gcc_toolchain() must specify a \"readelf\" value")
- assert(defined(invoker.nm), "gcc_toolchain() must specify a \"nm\" value")
assert(defined(invoker.toolchain_cpu),
"gcc_toolchain() must specify a \"toolchain_cpu\"")
assert(defined(invoker.toolchain_os),
@@ -57,8 +52,16 @@ template("gcc_toolchain") {
cxx = invoker.cxx
ar = invoker.ar
ld = invoker.ld
- readelf = invoker.readelf
- nm = invoker.nm
+ if (defined(invoker.readelf)) {
+ readelf = invoker.readelf
+ } else {
+ readelf = "readelf"
+ }
+ if (defined(invoker.nm)) {
+ nm = invoker.nm
+ } else {
+ nm = "nm"
+ }
# Bring these into our scope for string interpolation with default values.
if (defined(invoker.libs_section_prefix)) {
@@ -145,6 +148,8 @@ template("gcc_toolchain") {
temporary_tocname = sofile + ".tmp"
link_command =
"$ld -shared {{ldflags}} -o $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")
toc_command = "{ $readelf -d $sofile | grep SONAME ; $nm -gD -f p $sofile | cut -f1-2 -d' '; } > $temporary_tocname"
replace_command = "if ! cmp -s $temporary_tocname $tocfile; then mv $temporary_tocname $tocfile; fi"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698