Page MenuHomePhabricator

Disabling BL2 on cmake command line causes duplication of ASM_FLAGS
Open, Needs TriagePublic

Description

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.

Example:

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.

Event Timeline

TTornblom renamed this task from DIsabling BL2 on cmake command line causes duplication of ASM_FLAGS to Disabling BL2 on cmake command line causes duplication of ASM_FLAGS.Mon, Aug 24, 11:51 AM
TTornblom created this task.

This does not seem to be an issue with the new build system.