MainBuildRules: Fail if the generated struct-offsets header is empty.
In some LTO-related experiments, it came out empty due to GCC not generating actual assembly but rather intermediate code, resulting in various later targets failing with quite literally thousands of errors.
This commit is contained in:
@@ -383,6 +383,7 @@ actions CreateAsmStructOffsetsHeader1
|
||||
$(C++) -S "$(2)" $(C++FLAGS) $(CCDEFS) $(CCHDRS) -o - \
|
||||
| $(SED) 's/@define/#define/g' | grep "#define" \
|
||||
| $(SED) -e 's/[\$\#]\([0-9]\)/\1/' > "$(1)"
|
||||
grep -q "#define" "$(1)"
|
||||
}
|
||||
|
||||
rule MergeObjectFromObjects
|
||||
@@ -420,7 +421,7 @@ rule MergeObjectFromObjects
|
||||
|
||||
actions MergeObjectFromObjects1
|
||||
{
|
||||
$(LINK) $(LINKFLAGS) -r $(2) -o $(1) ;
|
||||
$(LINK) $(LINKFLAGS) -r $(2) -o $(1)
|
||||
}
|
||||
|
||||
rule MergeObject
|
||||
|
||||
Reference in New Issue
Block a user