blob: ee07d2de36d52de9c146798ce732f0e980c8d749 [file] [log] [blame]
Dmitriy Ivanov82fb91c2014-12-05 14:37:56 -08001# 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
Dmitriy Ivanovcfb84642015-01-28 10:13:43 -080015ifeq ($(HOST_OS), linux)
Dmitriy Ivanov82fb91c2014-12-05 14:37:56 -080016include $(CLEAR_VARS)
17
18ifeq ($(vg_build_second_arch),true)
19 LOCAL_MULTILIB := 32
20 vg_local_arch := x86
21else
22 LOCAL_MULTILIB := first
23 vg_local_arch := amd64
24endif
25
Chih-Hung Hsieh606dc242016-08-24 19:59:10 -070026# Do not call (builtin) memset from VG(memset).
27LOCAL_CLANG_CFLAGS += -fno-builtin-memset
Dmitriy Ivanov82fb91c2014-12-05 14:37:56 -080028
29LOCAL_MODULE := $(vg_local_module)-$(vg_local_arch)-linux
30
31LOCAL_SRC_FILES := $(vg_local_src_files)
32
33LOCAL_C_INCLUDES := $(common_includes) $(vg_local_c_includes)
34
35LOCAL_CFLAGS := $(vg_local_cflags) $(vg_local_host_arch_cflags)
36
37LOCAL_ASFLAGS := $(common_cflags) $(vg_local_host_arch_cflags)
38
39LOCAL_LDFLAGS := $(vg_local_ldflags) -lpthread
40
41LOCAL_MODULE_CLASS := $(vg_local_module_class)
42
43LOCAL_STATIC_LIBRARIES := \
44 $(foreach l,$(vg_local_static_libraries),$l-$(vg_local_arch)-linux)
45LOCAL_WHOLE_STATIC_LIBRARIES := \
46 $(foreach l,$(vg_local_whole_static_libraries),$l-$(vg_local_arch)-linux)
47
48ifeq ($(vg_local_target),EXECUTABLE)
49 LOCAL_FORCE_STATIC_EXECUTABLE := true
50 LOCAL_NO_FPIE := true
51endif
52
53ifneq ($(vg_local_target),STATIC_LIBRARY)
54 LOCAL_MODULE_PATH=$(HOST_OUT)/lib64/valgrind
55endif
56
57ifeq ($(vg_local_without_system_shared_libraries),true)
58 LOCAL_SYSTEM_SHARED_LIBRARIES :=
59 # for host 32 bit we need -static-libgcc
60 LOCAL_LDFLAGS += -lgcc
61endif
62
63ifeq ($(vg_local_no_crt),true)
64 LOCAL_NO_CRT := true
65endif
66
67LOCAL_CXX_STL := none
Dan Albert2d85f1e2015-06-16 14:23:07 -070068LOCAL_SANITIZE := never
Dmitriy Ivanov82fb91c2014-12-05 14:37:56 -080069
70include $(BUILD_HOST_$(vg_local_target))
Dmitriy Ivanovcfb84642015-01-28 10:13:43 -080071
72endif