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:
Augustin Cavalier
2018-11-24 14:35:10 -05:00
parent 1e30709b20
commit f6fe382433
+2 -1
View File
@@ -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