The docs for FlasCC's gcc says
-fllvm-llc-opt= Pass an argument through to the final invocation of llc (LLVM-IR->ABC codegen).
while running $FLASCC_HOME/usr/bin/llc --help
shows
-ascopt=<asc options> - Extra options to pass to ASC when compiling ActionScript
Finally, running java -jar $FLASCC_HOME/sdk/usr/lib/asc2.jar
shows that one of the arguments it takes is
[-config <ns::name=value>]
So it seems like we should be able to do this:
gcc ... -fllvm-llc-opt="-ascopt=-config CONFIG::RELEASE=true"
Unfortunately, while the flag does actually make it to asc.jar (!), it appears to be getting passed as one argument (rather than two), so it errors out. The space required by -config
is screwing things up.
The workaround is to pass the two pieces of the arg separately:
gcc ... -fllvm-llc-opt=-ascopt=-config -fllvm-llc-opt=-ascopt=CONFIG::RELEASE=true