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

Commit 5f9ee28

Browse files
committed
platform/clang_linux: Add profile and asan libs on x86.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@145950 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 347483c commit 5f9ee28

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

make/platform/clang_linux.mk

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,26 @@ Configs += full-x86_64
3333
Arch.full-x86_64 := x86_64
3434
endif
3535

36+
# Configuration for profile runtime.
37+
ifeq ($(CompilerTargetArch),i386)
38+
Configs += profile-i386
39+
Arch.profile-i386 := i386
40+
endif
41+
ifeq ($(CompilerTargetArch),x86_64)
42+
Configs += profile-x86_64
43+
Arch.profile-x86_64 := x86_64
44+
endif
45+
46+
# Configuration for ASAN runtime.
47+
ifeq ($(CompilerTargetArch),i386)
48+
Configs += asan-i386
49+
Arch.asan-i386 := i386
50+
endif
51+
ifeq ($(CompilerTargetArch),x86_64)
52+
Configs += asan-x86_64
53+
Arch.asan-x86_64 := x86_64
54+
endif
55+
3656
endif
3757

3858
###
@@ -41,9 +61,17 @@ CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer
4161

4262
CFLAGS.full-i386 := $(CFLAGS) -m32
4363
CFLAGS.full-x86_64 := $(CFLAGS) -m64
64+
CFLAGS.profile-i386 := $(CFLAGS) -m32
65+
CFLAGS.profile-x86_64 := $(CFLAGS) -m64
66+
CFLAGS.asan-i386 := $(CFLAGS) -m32
67+
CFLAGS.asan-x86_64 := $(CFLAGS) -m64
4468

4569
FUNCTIONS.full-i386 := $(CommonFunctions) $(ArchFunctions.i386)
4670
FUNCTIONS.full-x86_64 := $(CommonFunctions) $(ArchFunctions.x86_64)
71+
FUNCTIONS.profile-i386 := GCDAProfiling
72+
FUNCTIONS.profile-x86_64 := GCDAProfiling
73+
FUNCTIONS.asan-i386 := $(AsanFunctions)
74+
FUNCTIONS.asan-x86_64 := $(AsanFunctions)
4775

4876
# Always use optimized variants.
4977
OPTIMIZED := 1

0 commit comments

Comments
 (0)