Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ROCm] Use -fno-canonical-system-headers for gcc #19691

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import pipes

# Template values set by rocm_configure.bzl.
CPU_COMPILER = ('%{cpu_compiler}')
USE_CLANG = ('%{compiler}' == 'clang')
HOST_COMPILER_PATH = ('%{host_compiler_path}')

HIPCC_PATH = '%{hipcc_path}'
Expand Down Expand Up @@ -261,6 +262,8 @@ def main():
# this).
cpu_compiler_flags = [flag for flag in sys.argv[1:]
if not flag.startswith(('--rocm_log'))]
if not USE_CLANG:
cpu_compiler_flags.append('-fno-canonical-system-headers')

# XXX: SE codes need to be built with gcc, but need this macro defined
cpu_compiler_flags.append("-D__HIP_PLATFORM_HCC__")
Expand Down