Skip to content

Commit

Permalink
Merge pull request #10 from llvm-hs/9.0
Browse files Browse the repository at this point in the history
Update to build against llvm-hs-9.0
  • Loading branch information
sdiehl authored Dec 31, 2019
2 parents 7db0969 + 3194f6e commit 855975c
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 118 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ includes
*.epub
*.agdai
.stack-work
dist-newstyle
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sudo: false
dist: trusty
dist: xenial
language: generic

env:
Expand All @@ -17,9 +17,8 @@ addons:
- gcc-5
- g++-5
- libgmp-dev
- llvm-5.0-dev
sources:
- llvm-toolchain-trusty-5.0
- llvm-toolchain-xenial-9
- ubuntu-toolchain-r-test

before_install:
Expand All @@ -28,6 +27,11 @@ before_install:
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- export CC=/usr/bin/$GCC
- export CXX=/usr/bin/$GXX
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
- echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main" | sudo tee -a /etc/apt/sources.list
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/ppa
- sudo apt-get update
- sudo apt-get --yes install llvm-9 llvm-9-dev

install:
- stack --no-terminal --install-ghc test --only-dependencies
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013-2017, Stephen Diehl
Copyright (c) 2013-2020, Stephen Diehl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ point for the backend.
Install
-------

Check that your installed LLVM version is precisely 5.0.
Check that your installed LLVM version is precisely 9.0.

```bash
$ llvm-config --version
5.0
9.0
```

To build using stack:
Expand All @@ -31,14 +31,13 @@ $ stack exec main
To build using cabal:

```bash
$ cabal sandbox init
$ cabal install --only-dependencies
$ cabal build
$ cabal new-build
```

To run:

```bash
$ stack run
$ cabal run
Preprocessing executable 'standalone' for tutorial-0.2.0.0...
; ModuleID = 'my cool jit'
Expand Down
10 changes: 5 additions & 5 deletions tutorial.cabal → kaleidoscope.cabal
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: tutorial
name: kaleidoscope
version: 0.1.0.0
synopsis: Standalone LLVM JIT Tutorial
license: MIT
category: Compilers
description:
synopsis:
description: LLVM Kaleidoscope tutorial
synopsis: LLVM Kaleidoscope tutorial
license-file: LICENSE
author: Stephen Diehl
maintainer: [email protected]
Expand All @@ -18,8 +18,8 @@ executable main
bytestring >= 0.10,
mtl >= 2.2,
containers >= 0.5,
llvm-hs >= 5.0,
llvm-hs-pure >= 5.0
llvm-hs >= 9.0 && < 10.0,
llvm-hs-pure >= 9.0 && < 10.0

other-modules:
Codegen
Expand Down
Loading

0 comments on commit 855975c

Please sign in to comment.