-
Notifications
You must be signed in to change notification settings - Fork 131
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
Run the first chapter on a mac #19
Comments
Same here:
First 4 lines of .section __TEXT,__text,regular,pure_instructions
.macosx_version_min 14, 0
.globl _add
.align 4, 0x90 And after I removed that line |
I have not used LLVM on a Mac before, so if there is any advice about how to change the wording so that it's Linux and Mac agnostic the Markdown is here and pretty quick to change: https://github.com/sdiehl/kaleidoscope/blob/master/tutorial.md#llvm-introduction |
The problem is that GCC does not know about the A more serious problem is that on OS X, the current LLVM system default and the version provided by Homebrew are 3.6.0, which has no Haskell bindings yet. |
If you're using brew, you can install LLVM 3.4 by |
EDIT: The below is outdated. Simply follow the setup instructions in For future visitors: Old versions of Homebrew packages are now maintained here, so in order to install LLVM 3.5 and set up the Kaleidoscope tutorial, perform the following steps (tested on OS X El Cap): brew tap homebrew/versions
brew install llvm35
brew install libffi # the version provided in OS X El Cap is too outdated
cabal sandbox init
cabal configure # or cabal configure --flags=tutorial, see README.md
alias llvm-config='llvm-config-3.5' # see comment by @ayberkt
cabal install llvm-general-3.5.1.2 --extra-lib-dirs /usr/local/opt/libffi/lib/ # more recent 3.5.*.* versions might work too
cabal install --only-dependencies |
Hello,
I don't know if it's the good place to ask, so if I'm wrong don't be mad just tell me :)
I'm running OSX.
I installed llvm using brew and I compiled the first functions using llc.
Now I have a test.s and I don't know how to run it.
I tried the command gcc test.s -o hello.native and I have now the error:
test.s:2:2: error: unknown directive
.macosx_version_min 14, 1
Does anyone knows why?
Thanks
The text was updated successfully, but these errors were encountered: