Skip to content

Commit

Permalink
Use -no-integrated-as to create asm struct offsets
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Midar committed Nov 7, 2015
1 parent c762453 commit f2f1efc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build/jam/MainBuildRules
Expand Up @@ -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
Expand Down

0 comments on commit f2f1efc

Please sign in to comment.