blob: c0ff16c28f5a91ca2f8c655f8ef22ea00153581d [file] [log] [blame]
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -07001# Copyright (C) 2014 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15include $(CLEAR_VARS)
16
Dmitriy Ivanov82fb91c2014-12-05 14:37:56 -080017LOCAL_ARM_MODE := arm
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070018ifeq ($(vg_build_second_arch),true)
19LOCAL_MULTILIB := 32
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070020vg_local_arch := $(TARGET_2ND_ARCH)
Dimitry Ivanovff3686f2016-08-22 13:17:03 -070021vg_local_android_arch := $(TARGET_2ND_ARCH)
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070022else
23LOCAL_MULTILIB := first
Dmitriy Ivanovf2815ab2014-11-08 14:05:23 -080024vg_local_arch := $(vg_arch)
Dimitry Ivanovff3686f2016-08-22 13:17:03 -070025vg_local_android_arch := $(TARGET_ARCH)
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070026endif
27
Chih-Hung Hsiehe3972342016-09-28 20:02:14 -070028# For arm64 target, clang compiled valgrind has setjmp/longjump problems,
29# and gcc compiled valgrind failed many art test too.
30# See bug 28454823 and 29282211.
31LOCAL_CLANG_arm64 := false
Dmitriy Ivanov82fb91c2014-12-05 14:37:56 -080032
Chih-Hung Hsieh606dc242016-08-24 19:59:10 -070033# Do not call (builtin) memset from VG(memset).
34LOCAL_CLANG_CFLAGS += -fno-builtin-memset
35
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070036LOCAL_MODULE := $(vg_local_module)-$(vg_local_arch)-linux
37
Dimitry Ivanovff3686f2016-08-22 13:17:03 -070038LOCAL_MODULE_TARGET_ARCH := $(vg_local_android_arch)
Ying Wang4bf606d2016-03-16 19:45:49 -070039
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070040LOCAL_SRC_FILES := $(vg_local_src_files)
41
42LOCAL_C_INCLUDES := $(common_includes) $(vg_local_c_includes)
43
Dmitriy Ivanovdcf50a32015-05-07 15:12:30 -070044LOCAL_PACK_MODULE_RELOCATIONS := false
45
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070046LOCAL_CFLAGS := $(vg_local_cflags)
Dmitriy Ivanov82fb91c2014-12-05 14:37:56 -080047LOCAL_CFLAGS_$(TARGET_ARCH) := $(vg_local_target_arch_cflags)
48LOCAL_CFLAGS_$(TARGET_2ND_ARCH) := $(vg_local_target_2nd_arch_cflags)
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070049
50LOCAL_ASFLAGS := $(common_cflags)
Dmitriy Ivanov82fb91c2014-12-05 14:37:56 -080051LOCAL_ASFLAGS_$(TARGET_ARCH) := $(vg_local_target_arch_cflags)
52LOCAL_ASFLAGS_$(TARGET_2ND_ARCH) := $(vg_local_target_2nd_arch_cflags)
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070053
54
55LOCAL_LDFLAGS := $(vg_local_ldflags)
56
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070057LOCAL_MODULE_CLASS := $(vg_local_module_class)
58
59LOCAL_STATIC_LIBRARIES := \
60 $(foreach l,$(vg_local_static_libraries),$l-$(vg_local_arch)-linux)
61LOCAL_WHOLE_STATIC_LIBRARIES := \
62 $(foreach l,$(vg_local_whole_static_libraries),$l-$(vg_local_arch)-linux)
63
64ifeq ($(vg_local_target),EXECUTABLE)
65 LOCAL_FORCE_STATIC_EXECUTABLE := true
Dmitriy Ivanov82fb91c2014-12-05 14:37:56 -080066 LOCAL_NO_FPIE := true
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070067endif
68
Dmitriy Ivanov92a86352014-05-21 16:21:59 -070069ifneq ($(vg_local_target),STATIC_LIBRARY)
Dmitriy Ivanov82fb91c2014-12-05 14:37:56 -080070 LOCAL_MODULE_PATH=$(PRODUCT_OUT)$(vg_target_module_path)
Dmitriy Ivanov92a86352014-05-21 16:21:59 -070071endif
72
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070073ifeq ($(vg_local_without_system_shared_libraries),true)
74 LOCAL_SYSTEM_SHARED_LIBRARIES :=
75endif
76
77ifeq ($(vg_local_no_crt),true)
78 LOCAL_NO_CRT := true
79endif
80
Dmitriy Ivanovf41e8ea2014-04-10 15:45:17 -070081include $(BUILD_$(vg_local_target))