Enable -fobjc-arc for AST generation when arc=true in nswrap.yaml.

s still doesn't work
This commit is contained in:
Greg 2019-05-31 16:25:58 -04:00
parent e29ae58a9c
commit 2e235d0f29
2 changed files with 4 additions and 0 deletions

View File

@ -12,3 +12,4 @@ subclasses:
imports: [ simple.h ] imports: [ simple.h ]
frameworks: [ Foundation ] frameworks: [ Foundation ]
#arc: true

View File

@ -167,6 +167,9 @@ func Start() (err error) {
// Generate AST // Generate AST
cargs := []string{"-xobjective-c", "-Xclang", "-ast-dump", cargs := []string{"-xobjective-c", "-Xclang", "-ast-dump",
"-fsyntax-only","-fno-color-diagnostics"} "-fsyntax-only","-fno-color-diagnostics"}
if Config.Arc {
cargs = append(cargs,"-fobjc-arc")
}
cargs = append(cargs,Config.Inputfiles...) cargs = append(cargs,Config.Inputfiles...)
fmt.Printf("Generating AST\n") fmt.Printf("Generating AST\n")
astPP, err := exec.Command("clang",cargs...).Output() astPP, err := exec.Command("clang",cargs...).Output()