Skip to content

Commit

Permalink
8294281: Allow warnings to be disabled on a per-file basis
Browse files Browse the repository at this point in the history
Backport-of: e45f3d5176e4affaa08480b560ca983fdbcb2846
  • Loading branch information
lutkerd authored and mrserb committed Apr 4, 2023
1 parent 47e4dba commit 4c3aecb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions make/common/NativeCompilation.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,15 @@ define SetupCompileNativeFileBody
endif
endif

ifneq ($(DISABLE_WARNING_PREFIX), )
$1_WARNINGS_FLAGS := $$(addprefix $(DISABLE_WARNING_PREFIX), \
$$($$($1_BASE)_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)_$$($1_FILENAME)))
endif

$1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \
$$($$($1_BASE)_SYSROOT_CFLAGS)
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_WARNINGS_FLAGS)
$1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_WARNINGS_FLAGS)
$1_BASE_ASFLAGS := $$($$($1_BASE)_ASFLAGS) $$($$($1_BASE)_EXTRA_ASFLAGS)

ifneq ($$(filter %.c, $$($1_FILENAME)), )
Expand Down

1 comment on commit 4c3aecb

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.