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

Unified Diff: native_client_sdk/src/tools/nacl_gcc.mk

Issue 924253002: [NaCL SDK] Add initial support for nacl-clang (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: native_client_sdk/src/tools/nacl_gcc.mk
diff --git a/native_client_sdk/src/tools/nacl_gcc.mk b/native_client_sdk/src/tools/nacl_gcc.mk
index 1b0d984d48389161cddd456e91b4ce7151bca52d..37fb448bd0f211d0389447a161704c435aecd57e 100644
--- a/native_client_sdk/src/tools/nacl_gcc.mk
+++ b/native_client_sdk/src/tools/nacl_gcc.mk
@@ -26,7 +26,11 @@ 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)
endif
-ifeq (,$(findstring $(TOOLCHAIN),glibc))
+ifneq (,$(findstring $(TOOLCHAIN),newlib bionic))
+ARM_SUPPORT=1
+endif
+
+ifeq ($(ARM_SUPPORT),1)
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++)
@@ -179,7 +183,7 @@ endef
ifneq ($(TOOLCHAIN),bionic)
VALID_ARCHES := x86_32 x86_64
endif
-ifneq (glibc,$(TOOLCHAIN))
+ifeq ($(ARM_SUPPORT),1)
VALID_ARCHES += arm
endif
@@ -319,7 +323,7 @@ $(LIBDIR)/$(TOOLCHAIN)_x86_64/$(CONFIG)/lib$(1).a: $(X86_64_OUTDIR)/lib$(1)_x86_
endif
ifneq (,$(findstring arm,$(ARCHES)))
-ifneq ($(TOOLCHAIN),glibc)
+ifeq ($(ARM_SUPPORT),1)
all: $(ARM_OUTDIR)/lib$(1)_arm.a
$(ARM_OUTDIR)/lib$(1)_arm.a: $(foreach src,$(2),$(call SRC_TO_OBJ,$(src),_arm))
$(MKDIR) -p $$(dir $$@)

Powered by Google App Engine
This is Rietveld 408576698