Disabling BL2 on the cmake command line with "-DBL2=False" causes duplication of some ASM_FLAGS in flags.make files.
This causes IAR builds to fail, while ARMCLANG and GNUARM doesn't seem to care.
cmake .. -G"Unix Makefiles" -DPROJ_CONFIG=C:\Users\thomasto\Projects\tf-m1\trusted-firmware-m\configs\ConfigRegressionIPCTfmLevel2.cmake -DTARGET_PLATFORM=AN519 -DCOMPILER=GNUARM -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBL2=False
ASM_FLAGS = -march=armv8-m.base -O2 -g -DNDEBUG -O2 -g -DNDEBUG
C_FLAGS = -march=armv8-m.base -O3 -g -DNDEBUG
I have worked around the issue in https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/5365, but the proper solution would likely be to avoid generating these duplicates.