From 2e235d0f29440ea32d4a6ccda0bb0152efc60870 Mon Sep 17 00:00:00 2001 From: Greg Date: Fri, 31 May 2019 16:25:58 -0400 Subject: [PATCH] Enable -fobjc-arc for AST generation when arc=true in nswrap.yaml. s still doesn't work --- examples/simple/nswrap.yaml | 1 + main.go | 3 +++ 2 files changed, 4 insertions(+) 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()