diff --git a/examples/simple/nswrap.yaml b/examples/simple/nswrap.yaml index 9481111..9f9384d 100644 --- a/examples/simple/nswrap.yaml +++ b/examples/simple/nswrap.yaml @@ -12,3 +12,4 @@ subclasses: imports: [ simple.h ] frameworks: [ Foundation ] +#arc: true diff --git a/main.go b/main.go index 8810ee4..e682100 100644 --- a/main.go +++ b/main.go @@ -167,6 +167,9 @@ func Start() (err error) { // Generate AST cargs := []string{"-xobjective-c", "-Xclang", "-ast-dump", "-fsyntax-only","-fno-color-diagnostics"} + if Config.Arc { + cargs = append(cargs,"-fobjc-arc") + } cargs = append(cargs,Config.Inputfiles...) fmt.Printf("Generating AST\n") astPP, err := exec.Command("clang",cargs...).Output()