I am using clang as a front end for LLVM, and using an SConstruct file where the built-in flags are:

env['ARMCC_OPT'] = '${ARM_OPT_TIME} ${ARM_OPT_SPACE} ${ARM_OPT_STACK_GUARD}'

This evaluates to -Otime -Os -fstack-protector, but reading up -Otime -Os are contradictory, so I just want -Otime. Thus I add this line to my SConstruct:

env['ARMCC_OPT'] = '${ARM_OPT_TIME} ${ARM_OPT_STACK_GUARD}'

However, now I see:

<path>/llvm/release/arm/10.0.4/bin/clang <secret> -Werror -g -Otime -D<secret> <...> -c foo.c -o foo.o ==> error: invalid integral value 'time' in '-Otime' error: invalid integral value 'time' in '-Otime' <== Compiling

Why am I getting this error? Why was:

<path>/llvm/release/arm/10.0.4/bin/clang <secret> -Werror -g -Otime -Os -D<secret> <...> -c foo.c -o foo.o

OK?

Ken Y-N's user avatar

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.