0a1f513dca
- New major release version 16.0.0. * For details, see the release notes: - https://releases.llvm.org/16.0.0/docs/ReleaseNotes.html - https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html - https://releases.llvm.org/16.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html - https://releases.llvm.org/16.0.0/projects/libcxx/docs/ReleaseNotes.html - https://releases.llvm.org/16.0.0/tools/lld/docs/ReleaseNotes.html * New LLVM tools: - llvm-debuginfo-analyzer: Print a logical representation of low-level debug information. - llvm-remarkutil: Remark file utilities. * The test tool split-file is no longer installed. * New Clang tools: - amdgpu-arch and nvptx-arch: Tools used to detect locally available GPUs by the Clang OpenMP driver. - clang-include-cleaner: Standalone tool to determine which headers are used, using existing functionality in clangd. - clang-tblgen: Table Generation for Clang. * Removed Clang tools: clang-{nvlink,offload}-wrapper. - Rebase patches: * assume-opensuse.patch * check-no-llvm-exegesis.patch * link-clang-shared.patch * llvm_build_tablegen_component_as_shared_library.patch * llvm-do-not-install-static-libraries.patch * llvm-suse-implicit-gnu.patch * llvm-workaround-superfluous-branches.patch * openmp-drop-rpath.patch - Drop patches that have landed upstream: * clang-test-xfail-gnuless-triple.patch * CMake-Look-up-target-subcomponents-in-LLVM_AVAILABLE_LIBS.patch * libcxxabi-fix-armv7-test.patch * llvm-armv7-fix-vector-compare-with-zero-lowering.patch * llvm-link-atomic.patch - Remove llvm-better-detect-64bit-atomics-support.patch that should not be required anymore. - Add PGP signatures and keyring for source verification. OBS-URL: https://build.opensuse.org/request/show/1072964 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm16?expand=0&rev=1
103 lines
4.8 KiB
Diff
103 lines
4.8 KiB
Diff
From 555b572e3f407ac48b5f30fc06760cc4d0549977 Mon Sep 17 00:00:00 2001
|
|
From: Fangrui Song <i@maskray.me>
|
|
Date: Wed, 8 Mar 2023 10:18:40 -0800
|
|
Subject: [PATCH] Revert D118493 "Set rpath on openmp executables"
|
|
|
|
This reverts commit 9b9d08111b618d74574ba03e5cc3d752ecc56f55.
|
|
(Accepted by Jon https://reviews.llvm.org/D118493#4178250)
|
|
|
|
libc++, libc++abi, libunwind, and compiler-rt don't add the extra DT_RUNPATH,
|
|
it's strange for OpenMP to diverge.
|
|
Some build systems want to handle DT_RUNPATH themselves (e.g.
|
|
CMAKE_INSTALL_RPATH). Some distributions (e.g. Fedora) have policies against
|
|
DT_RUNPATH and the default DT_RUNPATH for OpenMP is causing trouble.
|
|
|
|
For users who don't want to specify rpath by themselves,
|
|
https://clang.llvm.org/docs/UsersManual.html#configuration-files
|
|
can be used to specify the default rpath, e.g.
|
|
specify -frtlib-add-rpath or -Wl,-rpath in bin/clang.cfg
|
|
---
|
|
clang/include/clang/Driver/Options.td | 6 ------
|
|
clang/lib/Driver/ToolChains/CommonArgs.cpp | 19 -------------------
|
|
clang/lib/Driver/ToolChains/CommonArgs.h | 3 ---
|
|
clang/test/OpenMP/Inputs/libomp.a | 1 -
|
|
openmp/libomptarget/test/lit.cfg | 2 --
|
|
5 files changed, 31 deletions(-)
|
|
delete mode 100644 clang/test/OpenMP/Inputs/libomp.a
|
|
|
|
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
|
|
index b8a12660b32b7..97b9fdbb31a02 100644
|
|
--- a/clang/include/clang/Driver/Options.td
|
|
+++ b/clang/include/clang/Driver/Options.td
|
|
@@ -4260,12 +4260,6 @@ def offload_add_rpath: Flag<["--"], "offload-add-rpath">, Flags<[NoArgumentUnuse
|
|
HelpText<"Add -rpath with HIP runtime library directory to the linker flags">;
|
|
def no_offload_add_rpath: Flag<["--"], "no-offload-add-rpath">, Flags<[NoArgumentUnused]>,
|
|
HelpText<"Do not add -rpath with HIP runtime library directory to the linker flags">;
|
|
-defm openmp_implicit_rpath: BoolFOption<"openmp-implicit-rpath",
|
|
- LangOpts<"OpenMP">,
|
|
- DefaultTrue,
|
|
- PosFlag<SetTrue, [], "Set rpath on OpenMP executables">,
|
|
- NegFlag<SetFalse>,
|
|
- BothFlags<[NoArgumentUnused]>>;
|
|
def r : Flag<["-"], "r">, Flags<[LinkerInput,NoArgumentUnused]>,
|
|
Group<Link_Group>;
|
|
def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[CC1Option, FlangOption, NoXarchOption]>,
|
|
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
|
|
index dc46b625bb676..bc32b8d8cac8d 100644
|
|
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
|
|
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
|
|
@@ -795,22 +795,6 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args,
|
|
/*IsLTO=*/true, PluginOptPrefix);
|
|
}
|
|
|
|
-void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC,
|
|
- const ArgList &Args,
|
|
- ArgStringList &CmdArgs) {
|
|
-
|
|
- if (Args.hasFlag(options::OPT_fopenmp_implicit_rpath,
|
|
- options::OPT_fno_openmp_implicit_rpath, true)) {
|
|
- // Default to clang lib / lib64 folder, i.e. the same location as device
|
|
- // runtime
|
|
- SmallString<256> DefaultLibPath =
|
|
- llvm::sys::path::parent_path(TC.getDriver().Dir);
|
|
- llvm::sys::path::append(DefaultLibPath, CLANG_INSTALL_LIBDIR_BASENAME);
|
|
- CmdArgs.push_back("-rpath");
|
|
- CmdArgs.push_back(Args.MakeArgString(DefaultLibPath));
|
|
- }
|
|
-}
|
|
-
|
|
void tools::addOpenMPRuntimeLibraryPath(const ToolChain &TC,
|
|
const ArgList &Args,
|
|
ArgStringList &CmdArgs) {
|
|
@@ -881,9 +865,6 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC,
|
|
CmdArgs.push_back("-lomptarget.devicertl");
|
|
|
|
addArchSpecificRPath(TC, Args, CmdArgs);
|
|
-
|
|
- if (RTKind == Driver::OMPRT_OMP)
|
|
- addOpenMPRuntimeSpecificRPath(TC, Args, CmdArgs);
|
|
addOpenMPRuntimeLibraryPath(TC, Args, CmdArgs);
|
|
|
|
return true;
|
|
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.h b/clang/lib/Driver/ToolChains/CommonArgs.h
|
|
index d44d9214c08bc..e64e9524601dd 100644
|
|
--- a/clang/lib/Driver/ToolChains/CommonArgs.h
|
|
+++ b/clang/lib/Driver/ToolChains/CommonArgs.h
|
|
@@ -117,9 +117,6 @@ void AddAssemblerKPIC(const ToolChain &ToolChain,
|
|
const llvm::opt::ArgList &Args,
|
|
llvm::opt::ArgStringList &CmdArgs);
|
|
|
|
-void addOpenMPRuntimeSpecificRPath(const ToolChain &TC,
|
|
- const llvm::opt::ArgList &Args,
|
|
- llvm::opt::ArgStringList &CmdArgs);
|
|
void addArchSpecificRPath(const ToolChain &TC, const llvm::opt::ArgList &Args,
|
|
llvm::opt::ArgStringList &CmdArgs);
|
|
void addOpenMPRuntimeLibraryPath(const ToolChain &TC,
|
|
diff --git a/clang/test/OpenMP/Inputs/libomp.a b/clang/test/OpenMP/Inputs/libomp.a
|
|
deleted file mode 100644
|
|
index 8b277f0dd5dcd..0000000000000
|
|
--- a/clang/test/OpenMP/Inputs/libomp.a
|
|
+++ /dev/null
|
|
@@ -1 +0,0 @@
|
|
-!<arch>
|