forked from ponylang/ponyc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update with experimental support for LLVM 6.0.0 (ponylang#2595)
This change adds experimental support for LLVM 6.0.0 and removes support for 4.0.1. The change still includes the workaround in the `Heap2Stack` optimization pass that can cause performance degradation (see ponylang#2371).
- Loading branch information
1 parent
ab168bd
commit 24871e7
Showing
13 changed files
with
159 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM ubuntu:14.04 | ||
|
||
ENV LLVM_VERSION 6.0.0 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
apt-transport-https \ | ||
build-essential \ | ||
g++ \ | ||
git \ | ||
libncurses5-dev \ | ||
libssl-dev \ | ||
make \ | ||
wget \ | ||
xz-utils \ | ||
zlib1g-dev \ | ||
&& cd /tmp \ | ||
&& wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.21.tar.bz2 \ | ||
&& tar xjvf pcre2-10.21.tar.bz2 \ | ||
&& cd pcre2-10.21 \ | ||
&& ./configure --prefix=/usr \ | ||
&& make \ | ||
&& sudo make install \ | ||
&& cd / \ | ||
&& rm -rf /tmp/pcre* \ | ||
&& wget -O - http://releases.llvm.org/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-14.04.tar.xz \ | ||
| tar xJf - --no-same-owner --strip-components 1 -C /usr/local/ clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-14.04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Build image | ||
|
||
```bash | ||
docker build -t ponylang/ponyc-ci:llvm-6.0.0 . | ||
``` | ||
|
||
# Run image to test | ||
|
||
Will get you a bash shell in the image to try cloning Pony into where you can test a build to make sure everything will work before pushing | ||
|
||
```bash | ||
docker run --name ponyc-ci-llvm-600 --rm -i -t ponylang/ponyc-ci:llvm-6.0.0 bash | ||
``` | ||
|
||
# Push to dockerhub | ||
|
||
You'll need credentials for the ponylang dockerhub account. Talk to @jemc or @seantallen for access | ||
|
||
```bash | ||
docker push ponylang/ponyc-ci:llvm-6.0.0 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,24 +49,6 @@ case "${TRAVIS_OS_NAME}" in | |
make clean | ||
brew uninstall [email protected] | ||
|
||
# 4.0.x | ||
brew install llvm@4 | ||
brew link --overwrite --force llvm@4 | ||
ln -fs "$(which llvm-config)" llvmsym/llvm-config-4.0 | ||
ln -fs "$(which clang++)" llvmsym/clang++-4.0 | ||
|
||
export CC1=clang-4.0 | ||
export CXX1=clang++-4.0 | ||
#echo "Running LLVM 4.0 config=debug build..." | ||
#export config=debug | ||
#ponyc-test | ||
echo "Running LLVM 4.0 config=release build..." | ||
export config=release | ||
ponyc-test | ||
|
||
make clean | ||
brew uninstall llvm@4 | ||
|
||
# 5.0.x | ||
brew install llvm@5 | ||
brew link --overwrite --force llvm@5 | ||
|
@@ -75,15 +57,31 @@ case "${TRAVIS_OS_NAME}" in | |
|
||
export CC1=clang-5.0 | ||
export CXX1=clang++-5.0 | ||
#echo "Running LLVM 5.0 config=debug build..." | ||
#export config=debug | ||
#ponyc-test | ||
echo "Running LLVM 5.0 config=release build..." | ||
export config=release | ||
ponyc-test | ||
|
||
make clean | ||
brew uninstall llvm@5 | ||
|
||
# 6.0.x | ||
# There is no llvm@6 package right now, so this will break once LLVM 7 | ||
# is released. Hopefully when they do that there will be a llvm@6 package | ||
# at which point both `brew install llvm` and `brew uninstall llvm` | ||
# should be updated to replace `llvm` with `llvm@6` | ||
brew install llvm | ||
brew link --overwrite --force llvm | ||
ln -fs "$(which llvm-config)" llvmsym/llvm-config-6.0 | ||
ln -fs "$(which clang++)" llvmsym/clang++-6.0 | ||
|
||
export CC1=clang-6.0 | ||
export CXX1=clang++-6.0 | ||
echo "Running LLVM 6.0 config=release build..." | ||
export config=release | ||
ponyc-test | ||
|
||
make clean | ||
brew uninstall llvm | ||
fi | ||
;; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,6 +205,8 @@ endif | |
ifndef LLVM_CONFIG | ||
ifneq (,$(shell which /usr/local/opt/llvm/bin/llvm-config 2> /dev/null)) | ||
LLVM_CONFIG = /usr/local/opt/llvm/bin/llvm-config | ||
else ifneq (,$(shell which llvm-config-6.0 2> /dev/null)) | ||
LLVM_CONFIG = llvm-config-6.0 | ||
else ifneq (,$(shell which llvm-config-3.9 2> /dev/null)) | ||
LLVM_CONFIG = llvm-config-3.9 | ||
else ifneq (,$(shell which /usr/local/opt/[email protected]/bin/llvm-config 2> /dev/null)) | ||
|
@@ -261,6 +263,8 @@ else ifeq ($(llvm_version),5.0.0) | |
$(warning WARNING: LLVM 5 support is experimental and may result in decreased performance or crashes) | ||
else ifeq ($(llvm_version),5.0.1) | ||
$(warning WARNING: LLVM 5 support is experimental and may result in decreased performance or crashes) | ||
else ifeq ($(llvm_version),6.0.0) | ||
$(warning WARNING: LLVM 6 support is experimental and may result in decreased performance or crashes) | ||
else | ||
$(warning WARNING: Unsupported LLVM version: $(llvm_version)) | ||
$(warning Please use LLVM 3.9.1) | ||
|
@@ -615,12 +619,12 @@ define CONFIGURE_COMPILER | |
compiler := $(CC) | ||
flags := $(ALL_CFLAGS) $(CFLAGS) | ||
endif | ||
|
||
ifeq ($(suffix $(1)),.bc) | ||
compiler := $(CC) | ||
flags := $(ALL_CFLAGS) $(CFLAGS) | ||
endif | ||
|
||
ifeq ($(suffix $(1)),.ll) | ||
compiler := $(CC) | ||
flags := $(ALL_CFLAGS) $(CFLAGS) -Wno-override-module | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.