From 47a96c099e739f46184dd9e0ad1de0615074f61b Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 11 Aug 2018 15:20:30 -0400 Subject: [PATCH] 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. --- build/jam/MainBuildRules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/jam/MainBuildRules b/build/jam/MainBuildRules index fbb70e08ce..b33ad8c9e8 100644 --- a/build/jam/MainBuildRules +++ b/build/jam/MainBuildRules @@ -267,6 +267,7 @@ rule CreateAsmStructOffsetsHeader header : source on $(header) { # use on $(1) variable values if ! $(PLATFORM) in $(SUPPORTED_PLATFORMS) { + Echo $(PLATFORM) is not in SUPPORTED_PLATFORMS, cannot make struct-offsets header! ; return ; } @@ -283,7 +284,6 @@ rule CreateAsmStructOffsetsHeader header : source if $(USES_BE_API) { sysHeaders += $(HOST_BE_API_HEADERS) ; } - } else { sysHeaders += [ FStandardHeaders $(TARGET_PACKAGING_ARCH) ] $(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ; @@ -320,7 +320,6 @@ rule CreateAsmStructOffsetsHeader header : source includesSeparator = $(HOST_INCLUDES_SEPARATOR) ; localIncludesOption = $(HOST_LOCAL_INCLUDES_OPTION) ; systemIncludesOption = $(HOST_SYSTEM_INCLUDES_OPTION) ; - } else { # warning flags if $(WARNINGS) != 0 { @@ -377,7 +376,8 @@ rule CreateAsmStructOffsetsHeader header : source actions CreateAsmStructOffsetsHeader1 { $(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