Skip to content

Commit 1658dce

Browse files
committed
gcc-plugins: allow to enable GCC_PLUGINS for COMPILE_TEST
Now that the compiler's plugin support is checked in Kconfig, all{yes,mod}config will not be bothered. Remove 'depends on !COMPILE_TEST' for GCC_PLUGINS. 'depends on !COMPILE_TEST' for the following three are still kept: GCC_PLUGIN_CYC_COMPLEXITY GCC_PLUGIN_STRUCTLEAK_VERBOSE GCC_PLUGIN_RANDSTRUCT_PERFORMANCE Kees suggested to do so because the first two are too noisy, and the last one would reduce the compile test coverage. I commented the reasons in arch/Kconfig. Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Kees Cook <[email protected]>
1 parent 59f5385 commit 1658dce

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

arch/Kconfig

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ menuconfig GCC_PLUGINS
417417
bool "GCC plugins"
418418
depends on HAVE_GCC_PLUGINS
419419
depends on PLUGIN_HOSTCC != ""
420-
depends on !COMPILE_TEST
421420
help
422421
GCC plugins are loadable modules that provide extra features to the
423422
compiler. They are useful for runtime instrumentation and static analysis.
@@ -427,7 +426,7 @@ menuconfig GCC_PLUGINS
427426
config GCC_PLUGIN_CYC_COMPLEXITY
428427
bool "Compute the cyclomatic complexity of a function" if EXPERT
429428
depends on GCC_PLUGINS
430-
depends on !COMPILE_TEST
429+
depends on !COMPILE_TEST # too noisy
431430
help
432431
The complexity M of a function's control flow graph is defined as:
433432
M = E - N + 2P
@@ -494,7 +493,7 @@ config GCC_PLUGIN_STRUCTLEAK_BYREF_ALL
494493
config GCC_PLUGIN_STRUCTLEAK_VERBOSE
495494
bool "Report forcefully initialized variables"
496495
depends on GCC_PLUGIN_STRUCTLEAK
497-
depends on !COMPILE_TEST
496+
depends on !COMPILE_TEST # too noisy
498497
help
499498
This option will cause a warning to be printed each time the
500499
structleak plugin finds a variable it thinks needs to be
@@ -534,7 +533,7 @@ config GCC_PLUGIN_RANDSTRUCT
534533
config GCC_PLUGIN_RANDSTRUCT_PERFORMANCE
535534
bool "Use cacheline-aware structure randomization"
536535
depends on GCC_PLUGIN_RANDSTRUCT
537-
depends on !COMPILE_TEST
536+
depends on !COMPILE_TEST # do not reduce test coverage
538537
help
539538
If you say Y here, the RANDSTRUCT randomization will make a
540539
best effort at restricting randomization to cacheline-sized

0 commit comments

Comments
 (0)