This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGcdbf6bfdc7d1: [HIP] Use argv[0] as the default choice for the Executable name. (authored by tra).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90436/new/ https://reviews.llvm.org/D90436 Files: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp Index: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp =================================================================== --- clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp +++ clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp @@ -1025,7 +1025,9 @@ // Save the current executable directory as it will be useful to find other // tools. - BundlerExecutable = sys::fs::getMainExecutable(argv[0], &BundlerExecutable); + BundlerExecutable = argv[0]; + if (!llvm::sys::fs::exists(BundlerExecutable)) + BundlerExecutable = sys::fs::getMainExecutable(argv[0], &BundlerExecutable); if (llvm::Error Err = Unbundle ? UnbundleFiles() : BundleFiles()) { reportError(std::move(Err));
Index: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp =================================================================== --- clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp +++ clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp @@ -1025,7 +1025,9 @@ // Save the current executable directory as it will be useful to find other // tools. - BundlerExecutable = sys::fs::getMainExecutable(argv[0], &BundlerExecutable); + BundlerExecutable = argv[0]; + if (!llvm::sys::fs::exists(BundlerExecutable)) + BundlerExecutable = sys::fs::getMainExecutable(argv[0], &BundlerExecutable); if (llvm::Error Err = Unbundle ? UnbundleFiles() : BundleFiles()) { reportError(std::move(Err));
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits