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

Unified Diff: Makefile.rules

Issue 7792066: [llvm] Conditionally include target intrinsics, based on --enable-target Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: cleanups Created 9 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 | docs/TableGenFundamentals.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Makefile.rules
===================================================================
--- Makefile.rules (revision 138929)
+++ Makefile.rules (working copy)
@@ -258,6 +258,9 @@
endif
endif
+CPP.Defines += $(patsubst %,-DTARGET_ENABLED_%,\
+ $(shell echo $(TARGETS_TO_BUILD) | tr a-z A-Z))
+
ifeq ($(ENABLE_PROFILING),1)
BuildMode := $(BuildMode)+Profile
CXX.Flags := $(filter-out -fomit-frame-pointer,$(CXX.Flags)) -pg -g
@@ -694,13 +697,18 @@
ScriptInstall = $(INSTALL) -m 0755
DataInstall = $(INSTALL) -m 0644
+# Tell TableGen which targets were enabled to do additional filtering.
+TABLEGEN_TARGET_FLAGS = $(patsubst %,-DTARGET_%,\
+ $(shell echo $(TARGETS_TO_BUILD) | tr a-z A-Z))
+
# When compiling under Mingw/Cygwin, the tblgen tool expects Windows
# paths. In this case, the SYSPATH function (defined in
# Makefile.config) transforms Unix paths into Windows paths.
TableGen = $(TBLGEN) -I $(call SYSPATH, $(PROJ_SRC_DIR)) \
-I $(call SYSPATH, $(LLVM_SRC_ROOT)/include) \
-I $(call SYSPATH, $(PROJ_SRC_ROOT)/include) \
- -I $(call SYSPATH, $(PROJ_SRC_ROOT)/lib/Target)
+ -I $(call SYSPATH, $(PROJ_SRC_ROOT)/lib/Target) \
+ $(TABLEGEN_TARGET_FLAGS)
Archive = $(AR) $(AR.Flags)
LArchive = $(LLVMToolDir)/llvm-ar rcsf
« no previous file with comments | « no previous file | docs/TableGenFundamentals.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698