forked from openkylin/platform_build
am 2e26f896: Merge "Simplify LOCAL_NO_CRT."
* commit '2e26f896a65563f750f2d459d13cc8edfa705d95': Simplify LOCAL_NO_CRT.
This commit is contained in:
commit
8f908ade58
|
@ -1067,7 +1067,6 @@ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_C_INCLUDES := $(my_c_includes)
|
|||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_IMPORT_INCLUDES := $(import_includes)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_LDFLAGS := $(my_ldflags)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_LDLIBS := $(my_ldlibs)
|
||||
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_NO_CRT := $(strip $(LOCAL_NO_CRT) $(LOCAL_NO_CRT_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)))
|
||||
|
||||
# this is really the way to get the files onto the command line instead
|
||||
# of using $^, because then LOCAL_ADDITIONAL_DEPENDENCIES doesn't work
|
||||
|
|
|
@ -185,7 +185,6 @@ LOCAL_CLANG_CPPFLAGS_$(TARGET_ARCH):=
|
|||
LOCAL_C_INCLUDES_$(TARGET_ARCH):=
|
||||
LOCAL_ASFLAGS_$(TARGET_ARCH):=
|
||||
LOCAL_CLANG_ASFLAGS_$(TARGET_ARCH):=
|
||||
LOCAL_NO_CRT_$(TARGET_ARCH):=
|
||||
LOCAL_LDFLAGS_$(TARGET_ARCH):=
|
||||
LOCAL_CLANG_LDFLAGS_$(TARGET_ARCH):=
|
||||
LOCAL_SHARED_LIBRARIES_$(TARGET_ARCH):=
|
||||
|
@ -204,7 +203,6 @@ LOCAL_CLANG_CPPFLAGS_$(TARGET_2ND_ARCH):=
|
|||
LOCAL_C_INCLUDES_$(TARGET_2ND_ARCH):=
|
||||
LOCAL_ASFLAGS_$(TARGET_2ND_ARCH):=
|
||||
LOCAL_CLANG_ASFLAGS_$(TARGET_2ND_ARCH):=
|
||||
LOCAL_NO_CRT_$(TARGET_2ND_ARCH):=
|
||||
LOCAL_LDFLAGS_$(TARGET_2ND_ARCH):=
|
||||
LOCAL_CLANG_LDFLAGS_$(TARGET_2ND_ARCH):=
|
||||
LOCAL_SHARED_LIBRARIES_$(TARGET_2ND_ARCH):=
|
||||
|
@ -223,7 +221,6 @@ LOCAL_CLANG_CPPFLAGS_$(HOST_ARCH):=
|
|||
LOCAL_C_INCLUDES_$(HOST_ARCH):=
|
||||
LOCAL_ASFLAGS_$(HOST_ARCH):=
|
||||
LOCAL_CLANG_ASFLAGS_$(HOST_ARCH):=
|
||||
LOCAL_NO_CRT_$(HOST_ARCH):=
|
||||
LOCAL_LDFLAGS_$(HOST_ARCH):=
|
||||
LOCAL_CLANG_LDFLAGS_$(HOST_ARCH):=
|
||||
LOCAL_SHARED_LIBRARIES_$(HOST_ARCH):=
|
||||
|
@ -241,7 +238,6 @@ LOCAL_CLANG_CPPFLAGS_$(HOST_2ND_ARCH):=
|
|||
LOCAL_C_INCLUDES_$(HOST_2ND_ARCH):=
|
||||
LOCAL_ASFLAGS_$(HOST_2ND_ARCH):=
|
||||
LOCAL_CLANG_ASFLAGS_$(HOST_2ND_ARCH):=
|
||||
LOCAL_NO_CRT_$(HOST_2ND_ARCH):=
|
||||
LOCAL_LDFLAGS_$(HOST_2ND_ARCH):=
|
||||
LOCAL_CLANG_LDFLAGS_$(HOST_2ND_ARCH):=
|
||||
LOCAL_SHARED_LIBRARIES_$(HOST_2ND_ARCH):=
|
||||
|
|
|
@ -793,7 +793,6 @@ define dump-module-variables
|
|||
@echo PRIVATE_ALL_STATIC_LIBRARIES=$(PRIVATE_ALL_STATIC_LIBRARIES);
|
||||
@echo PRIVATE_ALL_WHOLE_STATIC_LIBRARIES=$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES);
|
||||
@echo PRIVATE_ALL_OBJECTS=$(PRIVATE_ALL_OBJECTS);
|
||||
@echo PRIVATE_NO_CRT=$(PRIVATE_NO_CRT);
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
|
@ -1405,7 +1404,7 @@ $(hide) $(PRIVATE_CXX) \
|
|||
-Wl,--gc-sections \
|
||||
$(if $(filter true,$(PRIVATE_CLANG)),-shared,-Wl$(comma)-shared) \
|
||||
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
|
||||
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O)) \
|
||||
$(PRIVATE_TARGET_CRTBEGIN_SO_O) \
|
||||
$(PRIVATE_ALL_OBJECTS) \
|
||||
-Wl,--whole-archive \
|
||||
$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
|
||||
|
@ -1421,7 +1420,7 @@ $(hide) $(PRIVATE_CXX) \
|
|||
-o $@ \
|
||||
$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
|
||||
$(PRIVATE_LDFLAGS) \
|
||||
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_SO_O)) \
|
||||
$(PRIVATE_TARGET_CRTEND_SO_O) \
|
||||
$(PRIVATE_LDLIBS)
|
||||
endef
|
||||
|
||||
|
@ -1478,7 +1477,7 @@ $(hide) $(PRIVATE_CXX) -pie \
|
|||
-Wl,-z,nocopyreloc \
|
||||
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
|
||||
-Wl,-rpath-link=$(PRIVATE_TARGET_OUT_INTERMEDIATE_LIBRARIES) \
|
||||
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_DYNAMIC_O)) \
|
||||
$(PRIVATE_TARGET_CRTBEGIN_DYNAMIC_O) \
|
||||
$(PRIVATE_ALL_OBJECTS) \
|
||||
-Wl,--whole-archive \
|
||||
$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
|
||||
|
@ -1494,7 +1493,7 @@ $(hide) $(PRIVATE_CXX) -pie \
|
|||
-o $@ \
|
||||
$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
|
||||
$(PRIVATE_LDFLAGS) \
|
||||
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_O)) \
|
||||
$(PRIVATE_TARGET_CRTEND_O) \
|
||||
$(PRIVATE_LDLIBS)
|
||||
endef
|
||||
|
||||
|
@ -1522,7 +1521,7 @@ $(hide) $(PRIVATE_CXX) \
|
|||
-Wl,--gc-sections \
|
||||
-o $@ \
|
||||
$(PRIVATE_TARGET_GLOBAL_LD_DIRS) \
|
||||
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_STATIC_O)) \
|
||||
$(PRIVATE_TARGET_CRTBEGIN_STATIC_O) \
|
||||
$(PRIVATE_TARGET_GLOBAL_LDFLAGS) \
|
||||
$(PRIVATE_LDFLAGS) \
|
||||
$(PRIVATE_ALL_OBJECTS) \
|
||||
|
@ -1539,7 +1538,7 @@ $(hide) $(PRIVATE_CXX) \
|
|||
$(call normalize-target-libraries,$(filter %libcompiler_rt.a,$(PRIVATE_ALL_STATIC_LIBRARIES))) \
|
||||
$(PRIVATE_TARGET_LIBGCC) \
|
||||
-Wl,--end-group \
|
||||
$(if $(filter true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTEND_O))
|
||||
$(PRIVATE_TARGET_CRTEND_O)
|
||||
endef
|
||||
|
||||
define transform-o-to-static-executable
|
||||
|
|
|
@ -43,9 +43,15 @@ else
|
|||
my_target_libgcc := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_LIBGCC)
|
||||
endif
|
||||
my_target_libatomic := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_LIBATOMIC)
|
||||
ifeq ($(LOCAL_NO_CRT),true)
|
||||
my_target_crtbegin_dynamic_o :=
|
||||
my_target_crtbegin_static_o :=
|
||||
my_target_crtend_o :=
|
||||
else
|
||||
my_target_crtbegin_dynamic_o := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_CRTBEGIN_DYNAMIC_O)
|
||||
my_target_crtbegin_static_o := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_CRTBEGIN_STATIC_O)
|
||||
my_target_crtend_o := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_CRTEND_O)
|
||||
endif
|
||||
ifdef LOCAL_SDK_VERSION
|
||||
# Make sure the prebuilt NDK paths are put ahead of the TARGET_GLOBAL_LD_DIRS,
|
||||
# so we don't have race condition when the system libraries (such as libc, libstdc++) are also built in the tree.
|
||||
|
|
|
@ -48,8 +48,13 @@ else
|
|||
my_target_libgcc := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_LIBGCC)
|
||||
endif
|
||||
my_target_libatomic := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_LIBATOMIC)
|
||||
ifeq ($(LOCAL_NO_CRT),true)
|
||||
my_target_crtbegin_so_o :=
|
||||
my_target_crtend_so_o :=
|
||||
else
|
||||
my_target_crtbegin_so_o := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_CRTBEGIN_SO_O)
|
||||
my_target_crtend_so_o := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_CRTEND_SO_O)
|
||||
endif
|
||||
ifdef LOCAL_SDK_VERSION
|
||||
# Make sure the prebuilt NDK paths are put ahead of the TARGET_GLOBAL_LD_DIRS,
|
||||
# so we don't have race condition when the system libraries (such as libc, libstdc++) are also built in the tree.
|
||||
|
|
Loading…
Reference in New Issue