Get codebase completely working with LLVM
You can now build Cosmopolitan with Clang:
make -j8 MODE=llvm
o/llvm/examples/hello.com
The assembler and linker code is now friendly to LLVM too.
So it's not needed to configure Clang to use binutils under
the hood. If you love LLVM then you can now use pure LLVM.
This commit is contained in:
@@ -11,7 +11,7 @@ o/$(MODE)/test/libc/release/cosmopolitan.zip: \
|
||||
|
||||
o/$(MODE)/test/libc/release/smoke.com: \
|
||||
o/$(MODE)/test/libc/release/smoke.com.dbg
|
||||
@objcopy -SO binary $< $@
|
||||
@$(COMPILE) $(OBJCOPY) -S -O binary $< $@
|
||||
|
||||
o/$(MODE)/test/libc/release/smoke.com.dbg: \
|
||||
test/libc/release/smoke.c \
|
||||
@@ -29,8 +29,6 @@ o/$(MODE)/test/libc/release/smoke.com.dbg: \
|
||||
-nostdlib \
|
||||
-nostdinc \
|
||||
-mno-red-zone \
|
||||
-Wl,--gc-sections \
|
||||
-Wl,-z,max-page-size=0x1000 \
|
||||
-Wl,-T,o/$(MODE)/ape/ape.lds \
|
||||
-include o/cosmopolitan.h \
|
||||
test/libc/release/smoke.c \
|
||||
@@ -40,7 +38,7 @@ o/$(MODE)/test/libc/release/smoke.com.dbg: \
|
||||
|
||||
o/$(MODE)/test/libc/release/smokecxx.com: \
|
||||
o/$(MODE)/test/libc/release/smokecxx.com.dbg
|
||||
@objcopy -SO binary $< $@
|
||||
@$(COMPILE) $(OBJCOPY) -S -O binary $< $@
|
||||
|
||||
o/$(MODE)/test/libc/release/smokecxx.com.dbg: \
|
||||
test/libc/release/smokecxx.cc \
|
||||
@@ -58,8 +56,6 @@ o/$(MODE)/test/libc/release/smokecxx.com.dbg: \
|
||||
-nostdlib \
|
||||
-nostdinc \
|
||||
-mno-red-zone \
|
||||
-Wl,--gc-sections \
|
||||
-Wl,-z,max-page-size=0x1000 \
|
||||
-Wl,-T,o/$(MODE)/ape/ape.lds \
|
||||
-include o/cosmopolitan.h \
|
||||
test/libc/release/smokecxx.cc \
|
||||
@@ -84,8 +80,6 @@ o/$(MODE)/test/libc/release/smokeansi.com.dbg: \
|
||||
-nostdlib \
|
||||
-nostdinc \
|
||||
-mno-red-zone \
|
||||
-Wl,--gc-sections \
|
||||
-Wl,-z,max-page-size=0x1000 \
|
||||
-Wl,-T,o/$(MODE)/ape/ape.lds \
|
||||
-include o/cosmopolitan.h \
|
||||
test/libc/release/smoke.c \
|
||||
@@ -93,7 +87,7 @@ o/$(MODE)/test/libc/release/smokeansi.com.dbg: \
|
||||
o/$(MODE)/ape/ape.o \
|
||||
o/$(MODE)/cosmopolitan.a
|
||||
|
||||
o/$(MODE)/test/libc/release/smokeclang.ok: \
|
||||
o/$(MODE)/test/libc/release/clang.ok: \
|
||||
test/libc/release/clang.sh \
|
||||
test/libc/release/smoke.c \
|
||||
o/cosmopolitan.h \
|
||||
@@ -103,6 +97,18 @@ o/$(MODE)/test/libc/release/smokeclang.ok: \
|
||||
o/$(MODE)/cosmopolitan.a
|
||||
@$<
|
||||
|
||||
o/$(MODE)/test/libc/release/metal.ok: \
|
||||
test/libc/release/metal.sh \
|
||||
o/$(MODE)/examples/hello.com \
|
||||
o/$(MODE)/tool/build/blinkenlights.com.dbg
|
||||
@$<
|
||||
|
||||
o/$(MODE)/test/libc/release/emulate.ok: \
|
||||
test/libc/release/emulate.sh \
|
||||
o/$(MODE)/examples/hello.com \
|
||||
o/$(MODE)/tool/build/blinkenlights.com.dbg
|
||||
@$<
|
||||
|
||||
.PHONY: o/$(MODE)/test/libc/release
|
||||
o/$(MODE)/test/libc/release: \
|
||||
o/$(MODE)/test/libc/release/smoke.com \
|
||||
@@ -111,4 +117,6 @@ o/$(MODE)/test/libc/release: \
|
||||
o/$(MODE)/test/libc/release/smokecxx.com.runs \
|
||||
o/$(MODE)/test/libc/release/smokeansi.com \
|
||||
o/$(MODE)/test/libc/release/smokeansi.com.runs \
|
||||
o/$(MODE)/test/libc/release/smokeclang.ok
|
||||
o/$(MODE)/test/libc/release/clang.ok \
|
||||
o/$(MODE)/test/libc/release/emulate.ok \
|
||||
o/$(MODE)/test/libc/release/metal.ok
|
||||
|
||||
Reference in New Issue
Block a user