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

Unified Diff: Makefile.nacl

Issue 631703002: Use the pnacl-clang toolchain for (P)NaCL builds (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | src/base/atomicops.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Makefile.nacl
diff --git a/Makefile.nacl b/Makefile.nacl
index 34bd960fed1cb5bfcaf9fe3336724076c75ac9bd..3459c42c0d865c7a45b98cda642f4f6109468efa 100644
--- a/Makefile.nacl
+++ b/Makefile.nacl
@@ -36,41 +36,29 @@ NACL_BUILDS = $(foreach mode,$(MODES), \
$(addsuffix .$(mode),$(NACL_ARCHES)))
HOST_OS = $(shell uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')
-ifeq ($(HOST_OS), linux)
- TOOLCHAIN_DIR = linux_x86_glibc
-else
- ifeq ($(HOST_OS), mac)
- TOOLCHAIN_DIR = mac_x86_glibc
- else
- $(error Host platform "${HOST_OS}" is not supported)
- endif
-endif
-
TOOLCHAIN_PATH = $(realpath ${NACL_SDK_ROOT}/toolchain)
-NACL_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR}
+NACL_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/linux_pnacl
+
+ifeq ($(wildcard $(NACL_TOOLCHAIN)),)
+ $(error Cannot find Native Client toolchain in "${NACL_TOOLCHAIN}")
+endif
ifeq ($(ARCH), nacl_ia32)
GYPENV = nacl_target_arch=nacl_ia32 v8_target_arch=arm v8_host_arch=ia32
- TOOLCHAIN_ARCH = x86-4.4
- NACL_CC = "$(NACL_TOOLCHAIN)/bin/i686-nacl-gcc"
- NACL_CXX = "$(NACL_TOOLCHAIN)/bin/i686-nacl-g++"
- NACL_LINK = "$(NACL_TOOLCHAIN)/bin/i686-nacl-g++"
+ NACL_CC = "$(NACL_TOOLCHAIN)/bin/pnacl-clang"
+ NACL_CXX = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++"
+ NACL_LINK = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++ --pnacl-allow-native -arch x86-32"
else
ifeq ($(ARCH), nacl_x64)
GYPENV = nacl_target_arch=nacl_x64 v8_target_arch=arm v8_host_arch=ia32
- TOOLCHAIN_ARCH = x86-4.4
- NACL_CC = "$(NACL_TOOLCHAIN)/bin/x86_64-nacl-gcc"
- NACL_CXX = "$(NACL_TOOLCHAIN)/bin/x86_64-nacl-g++"
- NACL_LINK = "$(NACL_TOOLCHAIN)/bin/x86_64-nacl-g++"
+ NACL_CC = "$(NACL_TOOLCHAIN)/bin/pnacl-clang"
+ NACL_CXX = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++"
+ NACL_LINK = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++ --pnacl-allow-native -arch x86-64"
else
$(error Target architecture "${ARCH}" is not supported)
endif
endif
-ifeq ($(wildcard $(NACL_TOOLCHAIN)),)
- $(error Cannot find Native Client toolchain in "${NACL_TOOLCHAIN}")
-endif
-
# For mksnapshot host generation.
GYPENV += host_os=${HOST_OS}
@@ -85,7 +73,11 @@ NACL_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(NACL_BUILDS))
# For some reason the $$(basename $$@) expansion didn't work here...
$(NACL_BUILDS): $(NACL_MAKEFILES)
@$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \
+ CC=${NACL_CC} \
CXX=${NACL_CXX} \
+ AR="$(NACL_TOOLCHAIN)/bin/pnacl-ar" \
+ RANLIB="$(NACL_TOOLCHAIN)/bin/pnacl-ranlib" \
+ LD="$(NACL_TOOLCHAIN)/bin/pnacl-ld" \
LINK=${NACL_LINK} \
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
python -c "print raw_input().capitalize()") \
@@ -97,6 +89,7 @@ $(NACL_MAKEFILES):
GYP_DEFINES="${GYPENV}" \
CC=${NACL_CC} \
CXX=${NACL_CXX} \
+ LINK=${NACL_LINK} \
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH)" \
build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
« no previous file with comments | « no previous file | src/base/atomicops.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698