Skip to content

Update Makefile for Mac#35

Open
djberg96 wants to merge 1 commit into
I3oris:masterfrom
djberg96:mac_llvm
Open

Update Makefile for Mac#35
djberg96 wants to merge 1 commit into
I3oris:masterfrom
djberg96:mac_llvm

Conversation

@djberg96
Copy link
Copy Markdown

@djberg96 djberg96 commented May 8, 2026

I think I found a couple issues in the Makefile (originally on a Mac, hence the title, but I think these are generic).

The first is that line 19 is referring to $(CRYSTAL_ROOT)/llvm/ext/find-llvm-config instead of $(CRYSTAL_ROOT)/llvm/ext/find-llvm-config.sh.

The second is that cxxflags aren't appended.

Prior to these changes I was getting:

>make                                                                                                                      [18:41]
c++  -I/opt/homebrew/opt/openjdk/include  -c -o /Users/dberger/Dev/ic/share/crystal-ic/src/llvm/ext/llvm_ext.o /Users/dberger/Dev/ic/share/crystal-ic/src/llvm/ext/llvm_ext.cc
/Users/dberger/Dev/ic/share/crystal-ic/src/llvm/ext/llvm_ext.cc:1:10: fatal error: 'llvm/Config/llvm-config.h' file not found
    1 | #include <llvm/Config/llvm-config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [/Users/dberger/Dev/ic/share/crystal-ic/src/llvm/ext/llvm_ext.o] Error 1

Comment thread Makefile
LLVM_EXT_DIR := $(CRYSTAL_ROOT)/llvm/ext
LLVM_EXT_OBJ := $(LLVM_EXT_DIR)/llvm_ext.o
LLVM_CONFIG ?= $(shell $(CRYSTAL_ROOT)/llvm/ext/find-llvm-config)
LLVM_CONFIG ?= $(shell $(CRYSTAL_ROOT)/llvm/ext/find-llvm-config.sh)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants