am 6e048afb
: am ad60c86e
: am f1a3d5e8
: am 871bc703
: Merge "Update build system for better Clang behavior on Mac."
* commit '6e048afb4bcac4118b09cc0dd01f0ca2a797a95a': Update build system for better Clang behavior on Mac.
This commit is contained in:
commit
e99cb20d68
3 changed files with 16 additions and 8 deletions
|
@ -33,10 +33,10 @@ CLANG_CONFIG_UNKNOWN_CFLAGS := \
|
||||||
-Wno-unused-but-set-parameter
|
-Wno-unused-but-set-parameter
|
||||||
|
|
||||||
# Clang flags for all host rules
|
# Clang flags for all host rules
|
||||||
CLANG_CONFIG_HOST_EXTRA_ASFLAGS := --gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG)
|
CLANG_CONFIG_HOST_EXTRA_ASFLAGS :=
|
||||||
CLANG_CONFIG_HOST_EXTRA_CFLAGS := --gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG)
|
CLANG_CONFIG_HOST_EXTRA_CFLAGS :=
|
||||||
CLANG_CONFIG_HOST_EXTRA_CPPFLAGS := --gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG)
|
CLANG_CONFIG_HOST_EXTRA_CPPFLAGS :=
|
||||||
CLANG_CONFIG_HOST_EXTRA_LDFLAGS := --gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG)
|
CLANG_CONFIG_HOST_EXTRA_LDFLAGS :=
|
||||||
|
|
||||||
# Clang flags for all target rules
|
# Clang flags for all target rules
|
||||||
CLANG_CONFIG_TARGET_EXTRA_ASFLAGS :=
|
CLANG_CONFIG_TARGET_EXTRA_ASFLAGS :=
|
||||||
|
|
|
@ -13,17 +13,21 @@ HOST_ARCH_DESCRIPTOR_FOR_CLANG := i686-linux
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS := \
|
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS := \
|
||||||
|
--gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG) \
|
||||||
--sysroot=$(HOST_TOOLCHAIN_FOR_CLANG)/sysroot
|
--sysroot=$(HOST_TOOLCHAIN_FOR_CLANG)/sysroot
|
||||||
|
|
||||||
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CFLAGS :=
|
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CFLAGS := \
|
||||||
|
--gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG) \
|
||||||
|
|
||||||
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS := \
|
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS := \
|
||||||
|
--gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG) \
|
||||||
--sysroot=$(HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
|
--sysroot=$(HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
|
||||||
-isystem $(HOST_TOOLCHAIN_FOR_CLANG)/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG)/include/c++/4.6.x-google \
|
-isystem $(HOST_TOOLCHAIN_FOR_CLANG)/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG)/include/c++/4.6.x-google \
|
||||||
-isystem $(HOST_TOOLCHAIN_FOR_CLANG)/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG)/include/c++/4.6.x-google/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG) \
|
-isystem $(HOST_TOOLCHAIN_FOR_CLANG)/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG)/include/c++/4.6.x-google/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG) \
|
||||||
-isystem $(HOST_TOOLCHAIN_FOR_CLANG)/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG)/include/c++/4.6.x-google/backward \
|
-isystem $(HOST_TOOLCHAIN_FOR_CLANG)/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG)/include/c++/4.6.x-google/backward \
|
||||||
|
|
||||||
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS := \
|
CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS := \
|
||||||
|
--gcc-toolchain=$(HOST_TOOLCHAIN_FOR_CLANG) \
|
||||||
--sysroot=$(HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
|
--sysroot=$(HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
|
||||||
-B$(HOST_TOOLCHAIN_FOR_CLANG)/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG)/bin \
|
-B$(HOST_TOOLCHAIN_FOR_CLANG)/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG)/bin \
|
||||||
-B$(HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG)/4.6.x-google \
|
-B$(HOST_TOOLCHAIN_FOR_CLANG)/lib/gcc/$(HOST_ARCH_DESCRIPTOR_FOR_CLANG)/4.6.x-google \
|
||||||
|
|
|
@ -123,7 +123,9 @@ define transform-host-o-to-shared-lib-inner
|
||||||
$(hide) $(PRIVATE_CXX) \
|
$(hide) $(PRIVATE_CXX) \
|
||||||
-dynamiclib -single_module -read_only_relocs suppress \
|
-dynamiclib -single_module -read_only_relocs suppress \
|
||||||
$(HOST_GLOBAL_LD_DIRS) \
|
$(HOST_GLOBAL_LD_DIRS) \
|
||||||
$(HOST_GLOBAL_LDFLAGS) \
|
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
|
||||||
|
$(PRIVATE_HOST_GLOBAL_LDFLAGS) \
|
||||||
|
) \
|
||||||
$(PRIVATE_ALL_OBJECTS) \
|
$(PRIVATE_ALL_OBJECTS) \
|
||||||
$(addprefix -force_load , $(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
|
$(addprefix -force_load , $(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
|
||||||
$(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
$(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
||||||
|
@ -140,9 +142,11 @@ define transform-host-o-to-executable-inner
|
||||||
$(hide) $(PRIVATE_CXX) \
|
$(hide) $(PRIVATE_CXX) \
|
||||||
-Wl,-rpath,@loader_path/../lib \
|
-Wl,-rpath,@loader_path/../lib \
|
||||||
-o $@ \
|
-o $@ \
|
||||||
$(PRE_LION_DYNAMIC_LINKER_OPTIONS) -headerpad_max_install_names \
|
$(PRE_LION_DYNAMIC_LINKER_OPTIONS) -Wl,-headerpad_max_install_names \
|
||||||
$(HOST_GLOBAL_LD_DIRS) \
|
$(HOST_GLOBAL_LD_DIRS) \
|
||||||
$(HOST_GLOBAL_LDFLAGS) \
|
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
|
||||||
|
$(PRIVATE_HOST_GLOBAL_LDFLAGS) \
|
||||||
|
) \
|
||||||
$(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
$(call normalize-host-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
|
||||||
$(PRIVATE_ALL_OBJECTS) \
|
$(PRIVATE_ALL_OBJECTS) \
|
||||||
$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
|
$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
|
||||||
|
|
Loading…
Reference in a new issue