Skip to content

Commit

Permalink
CircleCI: Include LTO/bitcode default libs
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Mar 31, 2018
1 parent 25387d5 commit 52cda05
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,25 @@ commonSteps: &commonSteps
cd ..
altLibSuffix="32"
if [ "$CI_OS" = "osx" ]; then
altLibSuffix=""
altLibSuffix=""
fi
echo 'void main() { import std.stdio; writeln("Hello world, ", size_t.sizeof * 8, " bits"); }' > hello.d
$LDC_INSTALL_DIR/bin/ldc2 hello.d -m64 -of=hello64 -link-defaultlib-shared -L-Wl,-rpath,$LDC_INSTALL_DIR/lib
$LDC_INSTALL_DIR/bin/ldc2 hello.d -m32 -of=hello32 -link-defaultlib-shared -L-Wl,-rpath,$LDC_INSTALL_DIR/lib$altLibSuffix
./hello64
$LDC_INSTALL_DIR/bin/ldc2 hello.d -m32 -of=hello32 -link-defaultlib-shared -L-Wl,-rpath,$LDC_INSTALL_DIR/lib$altLibSuffix
./hello32
- run:
name: Hello world integration test with LTO
command: |
cd ..
# TODO: enable for OSX too; linker currently crashing with:
# Assertion failed: (WasErased && "Expected to drop a reference")
if [ "$CI_OS" = "linux" ]; then
$LDC_INSTALL_DIR/bin/ldc2 hello.d -of=hello_thin -flto=thin -defaultlib=phobos2-ldc-bc,druntime-ldc-bc
./hello_thin
$LDC_INSTALL_DIR/bin/ldc2 hello.d -of=hello_full -flto=full -defaultlib=phobos2-ldc-bc,druntime-ldc-bc
./hello_full
fi
- run:
name: Build dub
command: |
Expand Down Expand Up @@ -245,7 +257,7 @@ jobs:
- CI_OS: linux
- LLVM_VERSION: 5.0.1
- HOST_LDC_VERSION: 1.6.0
- EXTRA_CMAKE_FLAGS: "-DMULTILIB=ON -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON"
- EXTRA_CMAKE_FLAGS: "-DMULTILIB=ON -DBUILD_BC_LIBS=ON -DD_FLAGS='-w;-flto=thin' -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON"
- DUB_VERSION: v1.7.2
build-osx:
<<: *commonSteps
Expand All @@ -258,7 +270,7 @@ jobs:
- LLVM_VERSION: 5.0.1
- HOST_LDC_VERSION: 1.6.0
- BOOTSTRAP_CMAKE_FLAGS: "-DCMAKE_CXX_FLAGS='-stdlib=libc++' -DCMAKE_EXE_LINKER_FLAGS=-lc++"
- EXTRA_CMAKE_FLAGS: "-DMULTILIB=ON -DCMAKE_CXX_FLAGS='-stdlib=libc++' -DCMAKE_EXE_LINKER_FLAGS=-lc++"
- EXTRA_CMAKE_FLAGS: "-DMULTILIB=ON -DBUILD_BC_LIBS=ON -DD_FLAGS='-w;-flto=thin' -DCMAKE_CXX_FLAGS='-stdlib=libc++' -DCMAKE_EXE_LINKER_FLAGS=-lc++"
- DUB_VERSION: v1.7.2

workflows:
Expand Down

0 comments on commit 52cda05

Please sign in to comment.