support STRIP() macro for GO_PROGRAM
@@ -3212,6 +3212,7 @@ when ($USE_OPENMP == "yes") {
when ($STRIP == "yes" && $NO_STRIP != "yes") {
STRIP_FLAG=$LD_STRIP_FLAG
DWARF_COMMAND=
+ GO_LINK_FLAGS_VALUE+=-s
}
@@ -5955,12 +5956,12 @@ module _GO_BASE_UNIT: _BASE_UNIT {
when ($OS_DARWIN) {
GO_TOOLCHAIN_ENV += ${env:"CC=clang"} ${env:"PATH=$(DEFAULT_DARWIN_X86_64)/bin:$MACOS_SDK_RESOURCE_GLOBAL/usr/bin:$CCTOOLS_ROOT_RESOURCE_GLOBAL/bin"}
- GO_EXTLD = ++extld clang ++extldflags $LD_SDK_VERSION -undefined dynamic_lookup $C_FLAGS_PLATFORM --sysroot=$MACOS_SDK_RESOURCE_GLOBAL ${rootrel:SRCS_GLOBAL} $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE $OBJADDE_LIB $GO_LDFLAGS_GLOBAL $C_LIBRARY_PATH $C_SYSTEM_LIBRARIES_INTERCEPT $C_SYSTEM_LIBRARIES
+ GO_EXTLD = ++extld clang ++extldflags $LD_SDK_VERSION -undefined dynamic_lookup $C_FLAGS_PLATFORM --sysroot=$MACOS_SDK_RESOURCE_GLOBAL ${rootrel:SRCS_GLOBAL} $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE $OBJADDE_LIB $GO_LDFLAGS_GLOBAL $C_LIBRARY_PATH $C_SYSTEM_LIBRARIES_INTERCEPT $C_SYSTEM_LIBRARIES $STRIP_FLAG
CGO2_LDFLAGS_VALUE += $LD_SDK_VERSION -undefined dynamic_lookup -nodefaultlibs -lc
}
elsewhen ($OS_LINUX) {
GO_TOOLCHAIN_ENV += ${env:"CC=clang"} ${env:"PATH=$(DEFAULT_LINUX_X86_64)/bin:$OS_SDK_ROOT_RESOURCE_GLOBAL/usr/bin"}
- GO_EXTLD = ++extld clang ++extldflags $C_FLAGS_PLATFORM --sysroot=$OS_SDK_ROOT_RESOURCE_GLOBAL ${rootrel:SRCS_GLOBAL} $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE $OBJADDE_LIB $GO_LDFLAGS_GLOBAL $C_LIBRARY_PATH $C_SYSTEM_LIBRARIES_INTERCEPT $C_SYSTEM_LIBRARIES
+ GO_EXTLD = ++extld clang ++extldflags $C_FLAGS_PLATFORM --sysroot=$OS_SDK_ROOT_RESOURCE_GLOBAL ${rootrel:SRCS_GLOBAL} $LDFLAGS $LDFLAGS_GLOBAL $OBJADDE $OBJADDE_LIB $GO_LDFLAGS_GLOBAL $C_LIBRARY_PATH $C_SYSTEM_LIBRARIES_INTERCEPT $C_SYSTEM_LIBRARIES $STRIP_FLAG
CGO2_LDFLAGS_VALUE += -Wl,--unresolved-symbols=ignore-all -nodefaultlibs -lc
}
otherwise {
