summaryrefslogtreecommitdiffstats
path: root/native_client_sdk
diff options
context:
space:
mode:
authorsbc@chromium.org <sbc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-15 16:24:52 +0000
committersbc@chromium.org <sbc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-15 16:24:52 +0000
commit39923fb77c1257760f8ae5296a12f3fea2a88677 (patch)
tree0af00df0e407167bc396bdbd6c78d0fbebe4b8cd /native_client_sdk
parentbe98edc4db0dfdc9c8b13d715c015f447b5969e2 (diff)
downloadchromium_src-39923fb77c1257760f8ae5296a12f3fea2a88677.zip
chromium_src-39923fb77c1257760f8ae5296a12f3fea2a88677.tar.gz
chromium_src-39923fb77c1257760f8ae5296a12f3fea2a88677.tar.bz2
[NaCl SDK] Speedup running of example Makefiles.
Use immediate assignment when reading from external external programs, in this case nacl_config.py. Review URL: https://codereview.chromium.org/133603005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244896 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rw-r--r--native_client_sdk/src/tools/common.mk7
-rw-r--r--native_client_sdk/src/tools/nacl_gcc.mk38
-rw-r--r--native_client_sdk/src/tools/nacl_llvm.mk14
3 files changed, 30 insertions, 29 deletions
diff --git a/native_client_sdk/src/tools/common.mk b/native_client_sdk/src/tools/common.mk
index 3989f1b..b90fbaf 100644
--- a/native_client_sdk/src/tools/common.mk
+++ b/native_client_sdk/src/tools/common.mk
@@ -31,6 +31,7 @@ GETOS := python $(NACL_SDK_ROOT)/tools/getos.py
NACL_CONFIG := python $(NACL_SDK_ROOT)/tools/nacl_config.py
FIXDEPS := python $(NACL_SDK_ROOT)/tools/fix_deps.py -c
OSNAME := $(shell $(GETOS))
+GDB_PATH := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=gdb)
#
@@ -332,8 +333,8 @@ NACL_LDFLAGS += -Wl,-as-needed -pthread
#
# Default Paths
#
-INC_PATHS ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --include-dirs) $(EXTRA_INC_PATHS)
-LIB_PATHS ?= $(NACL_SDK_ROOT)/lib $(EXTRA_LIB_PATHS)
+INC_PATHS := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --include-dirs) $(EXTRA_INC_PATHS)
+LIB_PATHS := $(NACL_SDK_ROOT)/lib $(EXTRA_LIB_PATHS)
#
# Define a LOG macro that allow a command to be run in quiet mode where
@@ -497,7 +498,7 @@ run_package: check_for_chrome all
@echo "$(TOOLCHAIN) $(CONFIG)" > $(CURDIR)/run_package_config
$(CHROME_PATH_ESCAPE) --load-and-launch-app=$(CURDIR) $(CHROME_ARGS)
-GDB_ARGS += -D $(shell $(NACL_CONFIG) --tool=gdb)
+GDB_ARGS += -D $(GDB_PATH)
GDB_ARGS += -D --eval-command="nacl-manifest $(abspath $(OUTDIR))/$(TARGET).nmf"
GDB_ARGS += -D $(GDB_DEBUG_TARGET)
diff --git a/native_client_sdk/src/tools/nacl_gcc.mk b/native_client_sdk/src/tools/nacl_gcc.mk
index 22e20f0..858c735 100644
--- a/native_client_sdk/src/tools/nacl_gcc.mk
+++ b/native_client_sdk/src/tools/nacl_gcc.mk
@@ -13,27 +13,27 @@
# We always link with the C++ compiler but include -Wl,-as-needed flag
# in LDFLAGS so the linker should drop libc++ unless it's actually needed.
#
-X86_32_CC ?= $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=cc)
-X86_32_CXX ?= $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=c++)
-X86_32_LINK ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=c++)
-X86_32_LIB ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=ar)
-X86_32_STRIP ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=strip)
-X86_32_NM ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=nm)
-
-X86_64_CC ?= $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=cc)
-X86_64_CXX ?= $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=c++)
-X86_64_LINK ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=c++)
-X86_64_LIB ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=ar)
-X86_64_STRIP ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=strip)
-X86_64_NM ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=nm)
+X86_32_CC := $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=cc)
+X86_32_CXX := $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=c++)
+X86_32_LINK := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=c++)
+X86_32_LIB := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=ar)
+X86_32_STRIP := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=strip)
+X86_32_NM := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_32 --tool=nm)
+
+X86_64_CC := $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=cc)
+X86_64_CXX := $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=c++)
+X86_64_LINK := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=c++)
+X86_64_LIB := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=ar)
+X86_64_STRIP := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=strip)
+X86_64_NM := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a x86_64 --tool=nm)
ifneq ($(TOOLCHAIN),glibc)
-ARM_CC ?= $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=cc)
-ARM_CXX ?= $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=c++)
-ARM_LINK ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=c++)
-ARM_LIB ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=ar)
-ARM_STRIP ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=strip)
-ARM_NM ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=nm)
+ARM_CC := $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=cc)
+ARM_CXX := $(NACL_COMPILER_PREFIX) $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=c++)
+ARM_LINK := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=c++)
+ARM_LIB := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=ar)
+ARM_STRIP := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=strip)
+ARM_NM := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) -a arm --tool=nm)
endif
NCVAL ?= python $(NACL_SDK_ROOT)/tools/ncval.py
diff --git a/native_client_sdk/src/tools/nacl_llvm.mk b/native_client_sdk/src/tools/nacl_llvm.mk
index c89a43a..c50b89c 100644
--- a/native_client_sdk/src/tools/nacl_llvm.mk
+++ b/native_client_sdk/src/tools/nacl_llvm.mk
@@ -10,13 +10,13 @@
#
# Paths to Tools
#
-PNACL_CC ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=cc)
-PNACL_CXX ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=c++)
-PNACL_LINK ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=c++)
-PNACL_LIB ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=ar)
-PNACL_STRIP ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=strip)
-PNACL_FINALIZE ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=finalize)
-PNACL_TRANSLATE ?= $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=translate)
+PNACL_CC := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=cc)
+PNACL_CXX := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=c++)
+PNACL_LINK := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=c++)
+PNACL_LIB := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=ar)
+PNACL_STRIP := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=strip)
+PNACL_FINALIZE := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=finalize)
+PNACL_TRANSLATE := $(shell $(NACL_CONFIG) -t $(TOOLCHAIN) --tool=translate)
#
# Compile Macro