blob: 384435a6b484a1328341de24f8ae742cf9a2f3b5 [file] [log] [blame]
Colin Cross36ee4ab2014-02-12 21:58:47 -08001LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
4LOCAL_SRC_FILES:= \
5 debugger.cpp \
6 dlfcn.cpp \
7 linker.cpp \
8 linker_environ.cpp \
9 linker_phdr.cpp \
10 rt.cpp \
11
12LOCAL_SRC_FILES_arm := arch/arm/begin.S
13LOCAL_SRC_FILES_arm64 := arch/arm64/begin.S
14LOCAL_SRC_FILES_x86 := arch/x86/begin.c
15LOCAL_SRC_FILES_x86_64 := arch/x86_64/begin.S
16LOCAL_SRC_FILES_mips := arch/mips/begin.S
17
18LOCAL_LDFLAGS := \
19 -shared \
20 -Wl,-Bsymbolic \
21 -Wl,--exclude-libs,ALL \
22
23LOCAL_CFLAGS += \
24 -fno-stack-protector \
25 -Wstrict-overflow=5 \
26 -fvisibility=hidden \
27 -Wall -Wextra -Werror \
28
29LOCAL_CONLYFLAGS += \
30 -std=gnu99 \
31
32LOCAL_CPPFLAGS += \
33 -std=gnu++11 \
34
35# We need to access Bionic private headers in the linker.
36LOCAL_CFLAGS += -I$(LOCAL_PATH)/../libc/
37
38# we don't want crtbegin.o (because we have begin.o), so unset it
39# just for this module
40LOCAL_NO_CRT := true
41# TODO: split out the asflags.
42LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
43
44LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/linker.mk $(LOCAL_PATH)/linker_executable.mk
45
46LOCAL_STATIC_LIBRARIES := libc_nomalloc
47
48LOCAL_FORCE_STATIC_EXECUTABLE := true # not necessary when not including BUILD_EXECUTABLE
49
50LOCAL_2ND_ARCH_VAR_PREFIX := $(linker_2nd_arch_var_prefix)
51
52ifeq ($(TARGET_IS_64_BIT)|$(linker_2nd_arch_var_prefix),true|)
53LOCAL_MODULE := linker64
54else
55LOCAL_MODULE := linker
56endif
57
58include $(LOCAL_PATH)/linker_executable.mk