mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Don't use gccld or gccas
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34093 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
282a7dad64
commit
43eb96c3ef
@ -312,11 +312,8 @@ ifndef TBLGEN
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
LLVM_CONFIG := $(LLVMToolDir)/llvm-config
|
LLVM_CONFIG := $(LLVMToolDir)/llvm-config
|
||||||
ifndef GCCAS
|
ifndef LLVMLD
|
||||||
GCCAS := $(LLVMToolDir)/gccas$(EXEEXT)
|
LLVMLD := $(LLVMToolDir)/gccld$(EXEEXT)
|
||||||
endif
|
|
||||||
ifndef GCCLD
|
|
||||||
GCCLD := $(LLVMToolDir)/gccld$(EXEEXT)
|
|
||||||
endif
|
endif
|
||||||
ifndef LLVMDIS
|
ifndef LLVMDIS
|
||||||
LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT)
|
LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT)
|
||||||
@ -712,14 +709,14 @@ $(warning Modules require llvm-gcc but no llvm-gcc is available ****)
|
|||||||
else
|
else
|
||||||
|
|
||||||
Module := $(LibDir)/$(MODULE_NAME).bc
|
Module := $(LibDir)/$(MODULE_NAME).bc
|
||||||
LinkModule := $(GCCLD) -L$(CFERuntimeLibDir)
|
LinkModule := $(LLVMLD) -L$(CFERuntimeLibDir)
|
||||||
|
|
||||||
|
|
||||||
ifdef EXPORTED_SYMBOL_FILE
|
ifdef EXPORTED_SYMBOL_FILE
|
||||||
LinkModule += -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
|
LinkModule += -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(Module): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD)
|
$(Module): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(LLVMLD)
|
||||||
$(Echo) Building $(BuildMode) Bytecode Module $(notdir $@)
|
$(Echo) Building $(BuildMode) Bytecode Module $(notdir $@)
|
||||||
$(Verb) $(LinkModule) -o $@ $(ObjectsBC)
|
$(Verb) $(LinkModule) -o $@ $(ObjectsBC)
|
||||||
|
|
||||||
@ -842,10 +839,10 @@ else
|
|||||||
all-local:: $(LibName.BCA)
|
all-local:: $(LibName.BCA)
|
||||||
|
|
||||||
ifdef EXPORTED_SYMBOL_FILE
|
ifdef EXPORTED_SYMBOL_FILE
|
||||||
BCLinkLib = $(GCCLD) -L$(CFERuntimeLibDir) \
|
BCLinkLib = $(LLVMLD) -L$(CFERuntimeLibDir) \
|
||||||
-internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
|
-internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
|
||||||
|
|
||||||
$(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(GCCLD) \
|
$(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(LLVMLD) \
|
||||||
$(LLVMToolDir)/llvm-ar
|
$(LLVMToolDir)/llvm-ar
|
||||||
$(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) \
|
$(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) \
|
||||||
"(internalize)"
|
"(internalize)"
|
||||||
@ -1182,13 +1179,14 @@ $(ObjDir)/%.s: %.c $(ObjDir)/.dir $(BUILT_SOURCES)
|
|||||||
|
|
||||||
# make the C and C++ compilers strip debug info out of bytecode libraries.
|
# make the C and C++ compilers strip debug info out of bytecode libraries.
|
||||||
ifdef DEBUG_RUNTIME
|
ifdef DEBUG_RUNTIME
|
||||||
$(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
|
$(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(LLVMAS) $(LOPT)
|
||||||
$(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
|
$(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
|
||||||
$(Verb) $(GCCAS) $< -o $@
|
$(Verb) $(LLVMAS) $< -o - | $(LOPT) -std-compile-opts $< -o $@
|
||||||
else
|
else
|
||||||
$(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS)
|
$(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(LLVMAS) $(LOPT)
|
||||||
$(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
|
$(Echo) "Compiling $*.ll to $*.bc for $(BuildMode) build (bytecode)"
|
||||||
$(Verb) $(GCCAS) -strip-debug $< -o $@
|
$(Verb) $(LLVMAS) $< -o - | \
|
||||||
|
$(LOPT) -std-compile-opts -strip-debug $< -o $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user