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

Unified Diff: Makefile

Issue 807143003: Remove the magic that sets CXX in the toplevel Makefile (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 11 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: Makefile
diff --git a/Makefile b/Makefile
index 606b5d7bf176abc6984d32869d095265d340dacf..2cef1954ca1a413b7d06ec3512d30cfc897672a0 100644
--- a/Makefile
+++ b/Makefile
@@ -27,8 +27,6 @@
# Variable default definitions. Override them by exporting them in your shell.
-CXX ?= g++
-LINK ?= g++
OUTDIR ?= out
TESTJOBS ?=
GYPFLAGS ?=
@@ -144,14 +142,9 @@ endif
ifeq ($(deprecationwarnings), on)
GYPFLAGS += -Dv8_deprecation_warnings=1
endif
-# asan=/path/to/clang++
-ifneq ($(strip $(asan)),)
- GYPFLAGS += -Dasan=1
- export CC=$(dir $(asan))clang
- export CXX=$(asan)
- export CXX_host=$(asan)
- export LINK=$(asan)
- export ASAN_SYMBOLIZER_PATH=$(dir $(asan))llvm-symbolizer
+# asan=on
+ifeq ($(asan), on)
+ GYPFLAGS += -Dasan=1 -Dclang=1
TESTFLAGS += --asan
ifeq ($(lsan), on)
GYPFLAGS += -Dlsan=1
@@ -291,7 +284,6 @@ $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES))
# Defines how to build a particular target (e.g. ia32.release).
$(BUILDS): $(OUTDIR)/Makefile.$$@
@$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \
- CXX="$(CXX)" LINK="$(LINK)" \
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
python -c "print \
raw_input().replace('opt', '').capitalize()") \
@@ -299,7 +291,7 @@ $(BUILDS): $(OUTDIR)/Makefile.$$@
native: $(OUTDIR)/Makefile.native
@$(MAKE) -C "$(OUTDIR)" -f Makefile.native \
- CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \
+ BUILDTYPE=Release \
builddir="$(shell pwd)/$(OUTDIR)/$@"
$(ANDROID_ARCHES): $(addprefix $$@.,$(MODES))
@@ -468,8 +460,10 @@ $(ENVFILE): $(ENVFILE).new
# Stores current GYPFLAGS in a file.
$(ENVFILE).new:
- @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS)" > $(ENVFILE).new; \
- echo "CXX=$(CXX)" >> $(ENVFILE).new
+ $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \
+ cut -f 2 -d " " | cut -f 1 -d "-" ))
+ $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH)))
+ @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS) -Dtarget_arch=$(CXX_TARGET_ARCH)" > $(ENVFILE).new;
# Heap constants for grokdump.
DUMP_FILE = tools/v8heapconst.py
« 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