MainBuildRules: Fix CreateAsmStructOffsetsHeader on recent Clang.
It seems that at on some platforms at least, Clang uses @define instead of #define, but with functionally identical syntax, so use sed to process it as such.
This commit is contained in:
@@ -267,6 +267,7 @@ rule CreateAsmStructOffsetsHeader header : source
|
|||||||
|
|
||||||
on $(header) { # use on $(1) variable values
|
on $(header) { # use on $(1) variable values
|
||||||
if ! $(PLATFORM) in $(SUPPORTED_PLATFORMS) {
|
if ! $(PLATFORM) in $(SUPPORTED_PLATFORMS) {
|
||||||
|
Echo $(PLATFORM) is not in SUPPORTED_PLATFORMS, cannot make struct-offsets header! ;
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,7 +284,6 @@ rule CreateAsmStructOffsetsHeader header : source
|
|||||||
if $(USES_BE_API) {
|
if $(USES_BE_API) {
|
||||||
sysHeaders += $(HOST_BE_API_HEADERS) ;
|
sysHeaders += $(HOST_BE_API_HEADERS) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
sysHeaders += [ FStandardHeaders $(TARGET_PACKAGING_ARCH) ]
|
sysHeaders += [ FStandardHeaders $(TARGET_PACKAGING_ARCH) ]
|
||||||
$(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ;
|
$(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ;
|
||||||
@@ -320,7 +320,6 @@ rule CreateAsmStructOffsetsHeader header : source
|
|||||||
includesSeparator = $(HOST_INCLUDES_SEPARATOR) ;
|
includesSeparator = $(HOST_INCLUDES_SEPARATOR) ;
|
||||||
localIncludesOption = $(HOST_LOCAL_INCLUDES_OPTION) ;
|
localIncludesOption = $(HOST_LOCAL_INCLUDES_OPTION) ;
|
||||||
systemIncludesOption = $(HOST_SYSTEM_INCLUDES_OPTION) ;
|
systemIncludesOption = $(HOST_SYSTEM_INCLUDES_OPTION) ;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
# warning flags
|
# warning flags
|
||||||
if $(WARNINGS) != 0 {
|
if $(WARNINGS) != 0 {
|
||||||
@@ -377,7 +376,8 @@ rule CreateAsmStructOffsetsHeader header : source
|
|||||||
actions CreateAsmStructOffsetsHeader1
|
actions CreateAsmStructOffsetsHeader1
|
||||||
{
|
{
|
||||||
$(C++) -S "$(2)" $(C++FLAGS) $(CCDEFS) $(CCHDRS) -o - \
|
$(C++) -S "$(2)" $(C++FLAGS) $(CCDEFS) $(CCHDRS) -o - \
|
||||||
| grep "#define" | $(SED) -e 's/[\$\#]\([0-9]\)/\1/' > "$(1)"
|
| $(SED) 's/@define/#define/g' | grep "#define" \
|
||||||
|
| $(SED) -e 's/[\$\#]\([0-9]\)/\1/' > "$(1)"
|
||||||
}
|
}
|
||||||
|
|
||||||
rule MergeObjectFromObjects
|
rule MergeObjectFromObjects
|
||||||
|
|||||||
Reference in New Issue
Block a user