BaseTools GCC: move -c compiler flag to build rules
In order to be able to share the compiler flags with the linker (which is required for LTO since it involves the linker doing code generation based on the LTO bytecode), move the -c GCC argument to the build rules, and drop it from the GCC CC_FLAGS definitions in tools_def. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -132,7 +132,7 @@
|
||||
|
||||
<Command.GCC, Command.GCCLD, Command.RVCT>
|
||||
# For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues
|
||||
"$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
|
||||
"$(CC)" $(CC_FLAGS) -c -o ${dst} $(INC) ${src}
|
||||
|
||||
<Command.XCODE>
|
||||
"$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
<Command.GCC, Command.GCCLD, Command.RVCT>
|
||||
# For RVCTCYGWIN CC_FLAGS must be first to work around pathing issues
|
||||
"$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
|
||||
"$(CC)" $(CC_FLAGS) -c -o ${dst} $(INC) ${src}
|
||||
"$(SYMRENAME)" $(SYMRENAME_FLAGS) ${dst}
|
||||
|
||||
[C-Code-File.BASE.AARCH64,C-Code-File.SEC.AARCH64,C-Code-File.PEI_CORE.AARCH64,C-Code-File.PEIM.AARCH64]
|
||||
@@ -172,7 +172,7 @@
|
||||
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
||||
|
||||
<Command.GCC, Command.GCCLD>
|
||||
"$(CC)" $(CC_FLAGS) $(CC_XIPFLAGS) -o ${dst} $(INC) ${src}
|
||||
"$(CC)" $(CC_FLAGS) $(CC_XIPFLAGS) -c -o ${dst} $(INC) ${src}
|
||||
|
||||
[C-Header-File]
|
||||
<InputFile>
|
||||
@@ -446,7 +446,7 @@
|
||||
"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
||||
|
||||
<Command.GCC, Command.GCCLD>
|
||||
"$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
|
||||
"$(ASLCC)" -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
|
||||
"$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
||||
"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
||||
|
||||
@@ -466,7 +466,7 @@
|
||||
"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
||||
|
||||
<Command.GCC, Command.GCCLD>
|
||||
"$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
|
||||
"$(ASLCC)" -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAGS) $(INC) ${src}
|
||||
"$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
|
||||
"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(GENFW_FLAGS)
|
||||
|
||||
|
Reference in New Issue
Block a user