diff options
Diffstat (limited to 'clang/lib/Driver/ToolChains/HIP.cpp')
| -rw-r--r-- | clang/lib/Driver/ToolChains/HIP.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains/HIP.cpp b/clang/lib/Driver/ToolChains/HIP.cpp index 03acf45a9b3..6efcfaee8fd 100644 --- a/clang/lib/Driver/ToolChains/HIP.cpp +++ b/clang/lib/Driver/ToolChains/HIP.cpp @@ -247,6 +247,12 @@ void HIPToolChain::addClangTargetOptions( if (DriverArgs.hasFlag(options::OPT_fcuda_rdc, options::OPT_fno_cuda_rdc, false)) CC1Args.push_back("-fcuda-rdc"); + + // Default to "hidden" visibility, as object level linking will not be + // supported for the foreseeable future. + if (!DriverArgs.hasArg(options::OPT_fvisibility_EQ, + options::OPT_fvisibility_ms_compat)) + CC1Args.append({"-fvisibility", "hidden"}); } llvm::opt::DerivedArgList * |

