dry-run compile flag no more available in CLI 0.14.0 and optimization flags

Hi, two questions:

  • Is there any reason to remove the --dry-run flag from the compile command? I find useful to just check compilation without generating the build output folder...

  • I'm trying to change the optimization flag updating platform.txt (e.g. compiler.optimization_flags=-O0) and also adding a platform.local.txt to override the default variables but the compiler seems to ever use -Os, any idea?

Target is SAM D21.

Thanks.

neutrinonet:

  • Is there any reason to remove the --dry-run flag from the compile command?

Arduino CLI now defaults to the --dry-run behavior, so there is no longer any need for that flag.

neutrinonet:

  • I'm trying to change the optimization flag updating platform.txt (e.g. compiler.optimization_flags=-O0) and also adding a platform.local.txt to override the default variables but the compiler seems to ever use -Os, any idea?

Please provide the details about what you tried and I'm sure I'll be able to help you out.

Thanks for your fast reply. Good to know about the compile command. About optimization flags with default platform.txt (-Os) the output of the compile --show-properties shows:

compiler.optimization_flags=-Os
compiler.optimization_flags.debug=-Og -g3
compiler.optimization_flags.release=-Os

and on compile the output actually reflect this:

"C:\\arduino.core\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_XFARM_SAMD21_IOT_BOARD_09X -DARDUINO_ARCH_SAMD -D__SAMD21J18A__ -DUSB_VID=0x2341 -DUSB_PID=0x804d -DUSBCON "-DUSB_MANUFACTURER=\"xFarm SA\"" "-DUSB_PRODUCT=\"xFarm SAMD21 IoT board v0.9x\"" "-IC:\\arduino.core\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Include/" "-IC:\\arduino.core\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\Luca\\Playground\\projects\\arduino-cli\\xfarm-samd21.book\\hardware\\xfarm\\samd\\0.92\\cores\\arduino" "-IC:\\Users\\Luca\\Playground\\projects\\arduino-cli\\xfarm-samd21.book\\hardware\\xfarm\\samd\\0.92\\variants\\samd21" "C:\\Users\\Luca\\AppData\\Local\\Temp\\arduino-sketch-540D1551EFB7B212227516CBA9AAD5A3\\sketch\\xprobe_test.ino.cpp" -o nul

but when I modify platform.txt reading "compiler.optimization_flags=-O3" the output of the commands above are the same (i.e. still using -Os), I expect instrad to report the updated optimisation flag.