Skip to content

Add MacOS Build Instructions #1

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

Merged
merged 1 commit into from
Nov 16, 2022
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ cabal.sandbox.config
.DS_Store
*~
travis.log
dist-newstyle
cabal.project.local
1 change: 1 addition & 0 deletions cabal.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
profiling: False
library-profiling: True
overwrite-policy: always
2 changes: 2 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
with-compiler: ghc-9.0.2
packages: .
12 changes: 12 additions & 0 deletions elm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ Category: Compiler, Language
Cabal-version: >=1.9
Build-type: Simple

Data-files:
reactor/elm.json
reactor/check.py
reactor/src/*.elm
reactor/src/Index/*.elm
reactor/src/mock.txt
reactor/assets/favicon.ico
reactor/assets/styles.css
reactor/assets/source-sans-pro.ttf
reactor/assets/source-code-pro.ttf


source-repository head
type: git
location: git://github.com/elm/compiler.git
Expand Down
39 changes: 39 additions & 0 deletions installers/mac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,45 @@ So the point of running `sudo mv elm /usr/local/bin/` is to turn the `elm` binar

<br/>

## Installing from Source

First, install ghcup in homebrew (or you may manage your own ghc compiler):

```sh
> brew install ghcup
```

Then set the following versions:

```sh
> ghcup set ghc 9.0.2
> ghcup install cabal
```

You may need to ensure a proper link to llvm@13. Run:

```sh
brew install llvm@13
```

and then in the `ash-compiler` root directory, run:

```
echo "program-options\n ghc-options: \"$(pkg-config --cflags libffi)\"" > cabal.project.local
```

Now you should be able to build with:

```
cabal build elm
```

And you can install the elm executable via:

```
cabal install elm --overwrite-policy=always
```

## Uninstall

The following commands should remove everything:
Expand Down