gecko icon indicating copy to clipboard operation
gecko copied to clipboard

Support passing arguments to the assembler

Open eigenform opened this issue 5 years ago • 0 comments

Support passing arguments to powerpc-{gekko,eabi}-as with the --asflags command-line option. Currently have it so that instances of --asflags with gecko build will override settings in a configuration file.

Mainly looking to add this in order to have a cleaner way of supporting .ifdef directives in pieces of code that one may [or may not] want to assemble - although, there are potentially a bunch of other cases where you might want to control what the assembler is doing.

For example:

# my.asm

foo:
  ...

.ifdef DEBUG
  ...
.endif

bar:
  ...
# debug_my_patch.json
{
  "settings": {
    "asFlags": "--defsym=DEBUG=1"
  },
  "outputFiles": [ "file": "debug_my_patch.ini", ... ],
  "codes": [ ... ], 
}
# my_patch.json
{
  "settings": { },
  "outputFiles": [ "file": "my_patch.ini", ... ],
  "codes": [ ... ], 
}

I also let it print assembler messages by default - probably useful in cases where there are non-fatal warnings that aren't passed to stderr (we only hard fail to build when stderr output is non-null).

eigenform avatar Jul 13 '19 21:07 eigenform