Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 1957424

Browse files
vadimcnalexcrichton
authored andcommitted
Enable building compiler-rt for a specific LLVM triple with GCC.
1 parent 67b8d27 commit 1957424

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

make/platform/triple.mk

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This "platform" file is intended for building compiler-rt using gcc.
2+
# The actual target platform is selected by setting the TargetTriple variable to the corresponding LLVM triple.
3+
4+
Description := Static runtime libraries for platforms selected by 'TargetTriple'
5+
6+
# Provide defaults for the required vars
7+
ifndef CC
8+
CC := gcc
9+
endif
10+
ifndef CFLAGS
11+
CFLAGS := -Wall -O3
12+
endif
13+
14+
Configs := runtime
15+
16+
Arch := $(word 1,$(subst -, ,$(TargetTriple)))
17+
ifeq ($(Arch),i686)
18+
Arch := i386
19+
else ifeq ($(Arch),arm)
20+
Arch := armv7
21+
endif
22+
23+
# Filter out stuff that gcc cannot compile (these are only needed for clang-generated code anywasys).
24+
CommonFunctions_gcc := $(filter-out atomic enable_execute_stack,$(CommonFunctions))
25+
26+
FUNCTIONS.runtime := $(CommonFunctions_gcc) $(value ArchFunctions.$(Arch))
27+

0 commit comments

Comments
 (0)