Skip to content

Commit

Permalink
Merge pull request #297 from savi-lang/fix/remove-fpic
Browse files Browse the repository at this point in the history
Remove `-fPIC` from compiler build toolchain.
  • Loading branch information
jemc authored Apr 17, 2022
2 parents db87604 + 6fc676e commit 1ab88a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ $(BUILD)/savi-spec.o: spec/all.cr $(LLVM_PATH) $(shell find src lib spec -name '
# This variant of the target compiles in release mode.
$(BUILD)/savi-release: $(BUILD)/savi-release.o $(BUILD)/llvm_ext.bc $(BUILD)/llvm_ext_for_savi.bc lib/libsavi_runtime
mkdir -p `dirname $@`
${CLANG} -O3 -o $@ -flto=thin -fPIC \
${CLANG} -O3 -o $@ -flto=thin \
$(BUILD)/savi-release.o $(BUILD)/llvm_ext.bc $(BUILD)/llvm_ext_for_savi.bc \
${CRYSTAL_RT_LIBS} \
-target $(CLANG_TARGET_PLATFORM) \
Expand All @@ -282,7 +282,7 @@ $(BUILD)/savi-release: $(BUILD)/savi-release.o $(BUILD)/llvm_ext.bc $(BUILD)/llv
# This variant of the target compiles in debug mode.
$(BUILD)/savi-debug: $(BUILD)/savi-debug.o $(BUILD)/llvm_ext.bc $(BUILD)/llvm_ext_for_savi.bc lib/libsavi_runtime
mkdir -p `dirname $@`
${CLANG} -O0 -o $@ -flto=thin -fPIC \
${CLANG} -O0 -o $@ -flto=thin \
$(BUILD)/savi-debug.o $(BUILD)/llvm_ext.bc $(BUILD)/llvm_ext_for_savi.bc \
${CRYSTAL_RT_LIBS} \
-target $(CLANG_TARGET_PLATFORM) \
Expand All @@ -296,7 +296,7 @@ $(BUILD)/savi-debug: $(BUILD)/savi-debug.o $(BUILD)/llvm_ext.bc $(BUILD)/llvm_ex
# This variant of the target will be used when running tests.
$(BUILD)/savi-spec: $(BUILD)/savi-spec.o $(BUILD)/llvm_ext.bc $(BUILD)/llvm_ext_for_savi.bc lib/libsavi_runtime
mkdir -p `dirname $@`
${CLANG} -O0 -o $@ -flto=thin -fPIC \
${CLANG} -O0 -o $@ -flto=thin \
$(BUILD)/savi-spec.o $(BUILD)/llvm_ext.bc $(BUILD)/llvm_ext_for_savi.bc \
${CRYSTAL_RT_LIBS} \
-target $(CLANG_TARGET_PLATFORM) \
Expand Down

0 comments on commit 1ab88a1

Please sign in to comment.