seL4 / seL4_libs

No-assurance libraries for rapid-prototyping of seL4 apps.
https://docs.sel4.systems
Other
52 stars 62 forks source link

libsel4test: guard call to seL4_BenchmarkResetLog() by CONFIG_ENABLE_… #11

Closed axel-h closed 5 years ago

axel-h commented 5 years ago

…BENCHMARKS

Fix compilation failure about missing function seL4_BenchmarkResetLog(), which is defined only if CONFIG_ENABLE_BENCHMARKS is set.

axel-h commented 5 years ago

Actually, I wonder why I see this compilation error at all when building sel4test for x86 or ARM. Does this refer to incompatible repo version or am I missing a parameter here beyond PLATFORM (and AARCH64 in case of ARM)?

pingerino commented 5 years ago

@axel-h seems gcc isn't smart enough to see that this function isn't being called.

axel-h commented 5 years ago

Well, not sure if we can blame gcc there, the function is present in the code after all and it was not if-def'd out. Are there compilers out there that wont complain about a missing signature when the dead-code elimination figures out he call can be removed? I tend consider this as bad practice, because you'll end up with potentially broken code then.