Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Link libstdc++ statically for libldc-jit.so of prebuilt Linux packages #3474

Merged
merged 1 commit into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
# Also don't use relax relocations for the C(++) parts of the default libraries in order to
# support older user binutils (e.g., Ubuntu 14.04).
BOOTSTRAP_CMAKE_FLAGS: -DBUILD_LTO_LIBS=ON -DLDC_INSTALL_LTOPLUGIN=ON
EXTRA_CMAKE_FLAGS: -DMULTILIB=ON -DBUILD_LTO_LIBS=ON -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DRT_CFLAGS=-Wa,-mrelax-relocations=no -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON -DD_COMPILER_FLAGS="-flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto" -DEXTRA_CXXFLAGS=-flto=full
EXTRA_CMAKE_FLAGS: -DMULTILIB=ON -DBUILD_LTO_LIBS=ON -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DJITRT_EXTRA_LDFLAGS=-static-libstdc++ -DRT_CFLAGS=-Wa,-mrelax-relocations=no -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON -DD_COMPILER_FLAGS="-flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto" -DEXTRA_CXXFLAGS=-flto=full
steps:
- template: .azure-pipelines/posix.yml

Expand Down
7 changes: 3 additions & 4 deletions runtime/jit-rt/DefineBuildJitRT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ if(LDC_DYNAMIC_COMPILE)
# Set compiler-dependent flags
if(MSVC)
# Omit Default Library Name from the library, so it will work with both release and debug builds
set(JITRT_EXTRA_FLAGS "/Zl")

set(JITRT_EXTRA_FLAGS "${JITRT_EXTRA_FLAGS} /Zl")
else()
set(JITRT_EXTRA_FLAGS "-fPIC -fvisibility=hidden")
set(JITRT_EXTRA_FLAGS "${JITRT_EXTRA_FLAGS} -fPIC -fvisibility=hidden")
if(NOT APPLE)
CHECK_LINK_FLAG("--exclude-libs=ALL" LINKER_ACCEPTS_EXCLUDE_LIBS_ALL)
if(LINKER_ACCEPTS_EXCLUDE_LIBS_ALL)
set(JITRT_EXTRA_LDFLAGS "-Wl,--exclude-libs=ALL")
set(JITRT_EXTRA_LDFLAGS "${JITRT_EXTRA_LDFLAGS} -Wl,--exclude-libs=ALL")
endif()
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
matrix:
- LLVM_VERSION=10.0.0
HOST_LDC_VERSION=1.22.0
EXTRA_CMAKE_FLAGS="-DBUILD_LTO_LIBS=ON -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=aarch64"
EXTRA_CMAKE_FLAGS="-DBUILD_LTO_LIBS=ON -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DJITRT_EXTRA_LDFLAGS=-static-libstdc++ -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=aarch64"

build:
ci:
Expand Down