Use -no-integrated-as to create asm struct offsets

This depends on quite a nasty hack to generate those, namely using
inline assembly to generate a file with things that are not actually
assembly, which Clang therefore filters out.
This commit is contained in:
Jonathan Schleifer 2015-11-08 00:04:16 +01:00
parent c7624537a3
commit f2f1efc509
No known key found for this signature in database
GPG Key ID: 33E61C63EB4AE7B5

View File

@ -371,13 +371,17 @@ rule CreateAsmStructOffsetsHeader header : source
[ FSysIncludes $(sysHeaders) : $(systemIncludesOption) ] ;
CCDEFS on $(header) = [ FDefines $(defines) ] ;
if $(HAIKU_CC_IS_CLANG_$(architecture)) = 1 {
C++FLAGS on $(header) += -no-integrated-as ;
}
CreateAsmStructOffsetsHeader1 $(header) : $(source) ;
}
actions CreateAsmStructOffsetsHeader1
{
$(C++) -S "$(2)" $(C++FLAGS) $(CCDEFS) $(CCHDRS) -o - \
| grep "#define" | sed -e 's/[\$\#]\([0-9]\)/\1/' > "$(1)"
| grep "#define" | $(SED) -e 's/[\$\#]\([0-9]\)/\1/' > "$(1)"
}
rule MergeObjectFromObjects