Local build with extra compiler flags


I’m trying to run some float intensive code and I’m curious what the impart of -ffast-math would be.

I tried #pragma GCC optimize ("<flag>") first but it doesn’t seem to work.

I have the particle CLI installed and I can run particle compile photon <files> but I’d really like to be able:

  1. See all commands that particle compile is running code.
    • particle -v compile and particle compile -v have no effect
    • I can add errors and see some of the commands but not all.
  2. See an example Makefile used to compile a non-trivial example ideally using nonstandard flags.

Is this possible? do these resources exist?


CLI particle compile always uses a cloud build and uses the cloud based makefile and doesn’t support a custom makefile.

If you want to build locally you may want to consider using Particle Workbench or any other local toolchain.


I think there’s a use-case for building in the cloud with some custom compiler flags. It’s a false dichotomy that wanting custom flags == wanting to build locally. In particular, I want control over warnings, like -Wenum and -Wswitch-enum, -Wstack-usage etc.

I thin


It’s not a dichotomy at all.
You got a tool that is doing a particular thing but not another.
On the other hand there is a more versatile tool available - it offers building locally with full control over the build process and also offers the more “restricted” cloud building process.

You may propose an added feature to the exisisting tool, but currently it’s just not possible.