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: Bump LDC-LLVM to v10.0.1 #3513

Merged
merged 2 commits into from
Jul 24, 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
14 changes: 7 additions & 7 deletions .azure-pipelines/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ steps:
tar -xf ninja-mac.zip -C ninja
else
export DEBIAN_FRONTEND=noninteractive
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
CLANG_MAJOR=${CLANG_VERSION%%\.*}
sudo add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-$CLANG_MAJOR main"
Copy link
Member Author

@kinke kinke Jul 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've switched to their official 'nightlies' (e.g., currently actually 2 weeks old) apt repo because they've somehow moved to Ubuntu 18.04 for their x86_64 package with LLVM 10 (and that doesn't work on our 16.04, I've already tried it). They still use Ubuntu 16.04 for their PPC64le builds, so I guess this inconsistency stems from different people uploading their builds...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've run into that issue several times in the past. I've asked about the issue and the answer was that builds are manually created and uploaded. They also said that https://releases.llvm.org is more or less only the official place to get binaries for Windows. Other platforms are expected to get them from the package manager.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's really not very professional from their side, leading to stuff like

ldc/.travis.yml

Lines 53 to 57 in 10cf5f0

elif [ "$LLVM_VERSION" = "9.0.0" ]; then
export LLVM_ARCH="x86_64-darwin-apple"
else
export LLVM_ARCH="x86_64-apple-darwin"
fi
.

sudo dpkg --add-architecture i386
sudo apt-get -q update
sudo apt-get -yq install \
git-core cmake ninja-build g++-multilib \
git-core cmake ninja-build clang-$CLANG_MAJOR g++-multilib \
libcurl3 libcurl3:i386 \
curl gdb p7zip-full tzdata unzip zip
# Download & extract clang
curl -L -o clang.tar.xz http://releases.llvm.org/$CLANG_VERSION/clang+llvm-$CLANG_VERSION-x86_64-linux-gnu-ubuntu-16.04.tar.xz
mkdir clang
tar -xf clang.tar.xz --strip 1 -C clang
# Use ld.gold per default, so that LTO is tested
sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.gold 99
fi
Expand Down Expand Up @@ -86,8 +85,9 @@ steps:
export PATH="$PWD/ninja:$PATH" # for macOS
# Linux: use clang instead of gcc, for LTO
if [ "$CI_OS" = "linux" ]; then
export CC=$PWD/clang/bin/clang
export CXX=$PWD/clang/bin/clang++
CLANG_MAJOR=${CLANG_VERSION%%\.*}
export CC=/usr/bin/clang-$CLANG_MAJOR
export CXX=/usr/bin/clang++-$CLANG_MAJOR
fi
installDir=$PWD/install
mkdir build
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ steps:
7z x ../llvm.7z > nul
cd ..
:: Download & install clang
curl -L -o clang.exe http://releases.llvm.org/%CLANG_VERSION%/LLVM-%CLANG_VERSION%-win64.exe 2>&1
curl -L -o clang.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-%CLANG_VERSION%/LLVM-%CLANG_VERSION%-win64.exe 2>&1
clang.exe /S
displayName: Install prerequisites
- script: |
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ if(LDC_WITH_LLD)
else()
set(LDC_LINKERFLAG_LIST -llldDriver -llldMinGW -llldCOFF -llldELF -llldMachO -llldWasm -llldYAML -llldReaderWriter -llldCommon -llldCore ${LDC_LINKERFLAG_LIST})
endif()
if(APPLE) # bug, should be fixed in LLVM 6.0.1
if(APPLE AND LDC_LLVM_VER LESS 700) # LLVM 6.0.0 bug, should be fixed in 6.0.1
list(APPEND LDC_LINKERFLAG_LIST -lxml2)
endif()
endif()
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variables:
LLVM_VERSION: 10.0.0
CLANG_VERSION: 9.0.0
LLVM_VERSION: 10.0.1
CLANG_VERSION: 10.0.0
HOST_LDC_VERSION: 1.22.0

trigger:
Expand Down
4 changes: 4 additions & 0 deletions cmake/Modules/FindLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ else()
llvm_set(LDFLAGS ldflags)
llvm_set(SYSTEM_LIBS system-libs)
string(REPLACE "\n" " " LLVM_LDFLAGS "${LLVM_LDFLAGS} ${LLVM_SYSTEM_LIBS}")
if(APPLE) # unclear why/how this happens
string(REPLACE "-llibxml2.tbd" "-lxml2" LLVM_LDFLAGS ${LLVM_LDFLAGS})
endif()

llvm_set(LIBRARY_DIRS libdir true)
llvm_set_libs(LIBRARIES libs "${LLVM_FIND_COMPONENTS}")
# LLVM bug: llvm-config --libs tablegen returns -lLLVM-3.8.0
Expand Down
2 changes: 1 addition & 1 deletion shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
global:
- secure: RQ6gpJFPBDGVlnz+ZzSgeMpkcnvcA/7Lzyj/r06fMFR5iOz2cYaImCekNRw2PlhYQ+0FCQ119TLMKNOa7OUu6XxUp5LZtq7pSB6QLe3RB3YysFsosNPlY/wyyRsrW9ICEbDP/X8kPcfrDtOPGS/dGIwgeo0+R4Yl0OLDK9GrExEY45bWgvuLqoWDO89pi31kBk5LG5MAYhHZ0UTdboi5A2GRT0T8M0kr53jBRka8FGkbncXfHp9+/6IjTVJoUduRkdsk0A9RN1KRoao6rtrBNNvwIStc6zxJSOHszoaTp/K/ucGC4InZl/9GHPS/Y78SGKn7YJv3tGmcGzqAxrVaXQ==
matrix:
- LLVM_VERSION=10.0.0
- LLVM_VERSION=10.0.1
HOST_LDC_VERSION=1.22.0
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"

Expand Down