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

Side by Side Diff: make/platform/clang_nacl.mk

Issue 1283983002: Enable native targets used for non-SFI (Closed) Base URL: https://chromium.googlesource.com/a/native_client/pnacl-compiler-rt.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Description := Static runtime libraries for clang/NaCl. 1 Description := Static runtime libraries for clang/NaCl.
2 2
3 ### 3 ###
4 4
5 CC := clang 5 CC := clang
6 Arch := unknown 6 Arch := unknown
7 Configs := 7 Configs :=
8 8
9 # We don't currently have any general purpose way to target architectures other 9 # We don't currently have any general purpose way to target architectures other
10 # than the compiler defaults (because there is no generalized way to invoke 10 # than the compiler defaults (because there is no generalized way to invoke
11 # cross compilers). For now, we just find the target architecture of the compile r 11 # cross compilers). For now, we just find the target architecture of the compile r
12 # and only define configurations we know that compiler can generate. 12 # and only define configurations we know that compiler can generate.
13 CompilerTargetTriple := $(shell \ 13 CompilerTargetTriple := $(shell \
14 $(CC) $(EXTRA_CFLAGS) -v 2>&1 | grep 'Target:' | cut -d' ' -f2) 14 $(CC) $(EXTRA_CFLAGS) -v 2>&1 | grep 'Target:' | cut -d' ' -f2)
15 ifneq ($(DEBUGMAKE),) 15 ifneq ($(DEBUGMAKE),)
16 ifeq ($(CompilerTargetTriple),) 16 ifeq ($(CompilerTargetTriple),)
17 $(error "unable to infer compiler target triple for $(CC)") 17 $(error "unable to infer compiler target triple for $(CC)")
18 endif 18 endif
19 endif 19 endif
20 20
21 CompilerTargetArch := $(firstword $(subst -, ,$(CompilerTargetTriple))) 21 CompilerTargetArch := $(firstword $(subst -, ,$(CompilerTargetTriple)))
22 $(call CheckValue,CompilerTargetTriple) 22 $(call CheckValue,CompilerTargetTriple)
23 # Only define configs if we detected a nacl target.
24 ifneq ($(findstring -nacl,$(CompilerTargetTriple)),)
25 23
26 ifneq ($(findstring pnacl-clang,$(CC)),) 24 ifneq ($(findstring pnacl-clang,$(CC)),)
27 # pnacl-clang already uses the integrated assembler and does not support the 25 # pnacl-clang already uses the integrated assembler and does not support the
28 # integrated-as flag 26 # integrated-as flag
29 INTEGRATED_AS := 27 INTEGRATED_AS :=
30 else 28 else
31 INTEGRATED_AS := -integrated-as 29 INTEGRATED_AS := -integrated-as
32 endif 30 endif
33 31
34 # Configurations which just include all the runtime functions. 32 # Configurations which just include all the runtime functions.
35 ifeq ($(call contains,i686,$(CompilerTargetArch)),true) 33 ifeq ($(call contains,i686,$(CompilerTargetArch)),true)
36 Configs += full-i386 34 Configs += full-i386
37 Arch.full-i386 := i386 35 Arch.full-i386 := i386
38 else 36 else
39 ifeq ($(call contains,x86_64,$(CompilerTargetArch)),true) 37 ifeq ($(call contains,x86_64,$(CompilerTargetArch)),true)
40 Configs += full-x86_64 38 Configs += full-x86_64
41 Arch.full-x86_64 := x86_64 39 Arch.full-x86_64 := x86_64
42 else 40 else
43 ifeq ($(call contains,arm,$(CompilerTargetArch)),true) 41 ifeq ($(call contains,arm armv7 armv7a,$(CompilerTargetArch)),true)
44 # arm-nacl-clang reports this target
45 Configs += full-arm 42 Configs += full-arm
46 Arch.full-arm := armv7 43 Arch.full-arm := armv7
47 else 44 else
48 ifeq ($(call contains,armv7,$(CompilerTargetArch)),true)
49 # pnacl-clang with arm bias (used for arm-nonsfi) reports this target
50 Configs += full-arm
51 Arch.full-arm := armv7
52 else
53 ifeq ($(call contains,le32,$(CompilerTargetArch)),true) 45 ifeq ($(call contains,le32,$(CompilerTargetArch)),true)
54 # This is really for mips, but mips uses le32 bitcode 46 # This is really for mips, but mips uses le32 bitcode
55 # TODO(petarj): Remove this if possible. 47 # TODO(petarj): Remove this if possible.
56 Configs += full-mips32 48 Configs += full-mips32
57 Arch.full-mips32 := mips32 49 Arch.full-mips32 := mips32
58 else 50 else
59 ifeq ($(call contains,mipsel,$(CompilerTargetArch)),true) 51 ifeq ($(call contains,mipsel,$(CompilerTargetArch)),true)
60 # This is for mips d2n 52 # This is for mips d2n
61 Configs += full-mips32 53 Configs += full-mips32
62 Arch.full-mips32 := mips32 54 Arch.full-mips32 := mips32
63 endif 55 endif
64 endif 56 endif
65 endif 57 endif
66 endif 58 endif
67 endif 59 endif
68 endif
69 60
70 endif 61 endif
71 62
72 ### 63 ###
73 64
74 $(call CheckValue,CFLAGS) 65 $(call CheckValue,CFLAGS)
75 CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer $(EXTRA_CFLAGS) 66 CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer $(EXTRA_CFLAGS)
76 $(call CheckValue,CFLAGS) 67 $(call CheckValue,CFLAGS)
77 # Use the integrated assembler on x86-64 to ensure sandbox base-address hiding. 68 # Use the integrated assembler on x86-64 to ensure sandbox base-address hiding.
78 69
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 162
172 nacltest-x86-32: 163 nacltest-x86-32:
173 test/builtins/Unit/nacltest.py $(TCROOT)/bin/i686-nacl-clang \ 164 test/builtins/Unit/nacltest.py $(TCROOT)/bin/i686-nacl-clang \
174 $(FUNCTIONS.full-i386) 165 $(FUNCTIONS.full-i386)
175 nacltest-x86-64: 166 nacltest-x86-64:
176 test/builtins/Unit/nacltest.py $(TCROOT)/bin/x86_64-nacl-clang \ 167 test/builtins/Unit/nacltest.py $(TCROOT)/bin/x86_64-nacl-clang \
177 $(FUNCTIONS.full-x86_64) 168 $(FUNCTIONS.full-x86_64)
178 nacltest-arm: 169 nacltest-arm:
179 test/builtins/Unit/nacltest.py $(TCROOT)/bin/arm-nacl-clang \ 170 test/builtins/Unit/nacltest.py $(TCROOT)/bin/arm-nacl-clang \
180 $(FUNCTIONS.full-arm) 171 $(FUNCTIONS.full-arm)
OLDNEW
« 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