Skip to content

Commit 66e3725

Browse files
committed
SYCL: Rename clang-offload-packager to llvm-offload-binary after 2499fe1 (#32651)
Corresponding changes in sycl for [Offload] Rename and move 'clang-offload-packager' -> 'llvm-offload-binary' (llvm/llvm-project#161438)
1 parent e45bbde commit 66e3725

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

clang/lib/Driver/Action.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const char *Action::getClassName(ActionClass AC) {
4747
case OffloadPackagerJobClass:
4848
return "llvm-offload-binary";
4949
case OffloadPackagerExtractJobClass:
50-
return "clang-offload-packager-extract";
50+
return "llvm-offload-binary-extract";
5151
case OffloadDepsJobClass:
5252
return "clang-offload-deps";
5353
case SPIRVTranslatorJobClass:

clang/lib/Driver/Driver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7766,7 +7766,7 @@ Action *Driver::BuildOffloadingActions(Compilation &C,
77667766
for (StringRef Arch : getOffloadArchs(C, C.getArgs(), Kind, *TC)) {
77677767
TCAndArchs.push_back(std::make_pair(TC, Arch));
77687768
// Check if the InputArg is a preprocessed file that is created by the
7769-
// clang-offload-packager.
7769+
// llvm-offload-binary.
77707770
if (InputType == types::TY_PP_CXX &&
77717771
isOffloadBinaryFile(InputArg->getAsString(Args))) {
77727772
// Extract the specific preprocessed file given the current arch
@@ -8187,7 +8187,7 @@ Action *Driver::ConstructPhaseAction(
81878187
auto *ForEach = C.MakeAction<ForEachWrappingAction>(
81888188
TypedExtractIRFilesAction, OutputAction);
81898189
// This final job is mostly a no-op, but we need it to set the Action
8190-
// type to Tempfilelist which is expected by clang-offload-packager.
8190+
// type to Tempfilelist which is expected by llvm-offload-binary.
81918191
auto *ExtractBCFiles = C.MakeAction<FileTableTformJobAction>(
81928192
ForEach, types::TY_Tempfilelist, types::TY_Tempfilelist);
81938193
ExtractBCFiles->addExtractColumnTform(FileTableTformJobAction::COL_ZERO,
@@ -9410,7 +9410,7 @@ const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA,
94109410
llvm::replace(BoundArch, '*', '@');
94119411
}
94129412
// BoundArch may contain ',', which may create strings that interfere with
9413-
// the StringMap for the clang-offload-packager input values.
9413+
// the StringMap for the llvm-offload-binary input values.
94149414
std::replace(BoundArch.begin(), BoundArch.end(), ',', '@');
94159415

94169416
llvm::PrettyStackTraceString CrashInfo("Computing output path");

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10305,7 +10305,7 @@ void OffloadPackager::ConstructJob(Compilation &C, const JobAction &JA,
1030510305
CmdArgs, Inputs, Output));
1030610306
}
1030710307

10308-
// Use the clang-offload-packager to extract binaries from a packaged
10308+
// Use the llvm-offload-binary to extract binaries from a packaged
1030910309
// binary. This currently only supports single input/single output.
1031010310
void OffloadPackagerExtract::ConstructJob(Compilation &C, const JobAction &JA,
1031110311
const InputInfo &Output,

clang/lib/Driver/ToolChains/Clang.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class LLVM_LIBRARY_VISIBILITY OffloadPackager final : public Tool {
194194
class LLVM_LIBRARY_VISIBILITY OffloadPackagerExtract final : public Tool {
195195
public:
196196
OffloadPackagerExtract(const ToolChain &TC)
197-
: Tool("Offload::PackagerExtract", "clang-offload-packager", TC) {}
197+
: Tool("Offload::PackagerExtract", "llvm-offload-binary", TC) {}
198198

199199
bool hasIntegratedCPP() const override { return false; }
200200
void ConstructJob(Compilation &C, const JobAction &JA,

libdevice/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ if(NOT EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR})
2828
get_host_tool_path(llvm-ar LLVM_AR llvm-ar_exe llvm-ar_target)
2929
get_host_tool_path(append-file APPEND_FILE append-file_exe append-file_target)
3030
get_host_tool_path(clang-offload-bundler CLANG_OFFLOAD_BUNDLER clang-offload-bundler_exe clang-offload-bundler_target)
31-
get_host_tool_path(clang-offload-packager CLANG_OFFLOAD_PACKAGER clang-offload-packager_exe clang-offload-packager_target)
31+
get_host_tool_path(llvm-offload-binary LLVM_OFFLOAD_BINARY llvm-offload-binary_exe llvm-offload-binary_target)
3232
get_host_tool_path(file-table-tform FILE_TABLE_TFORM file-table-tform_exe file-table-tform_target)
3333
get_host_tool_path(llvm-foreach LLVM_FOREACH llvm-foreach_exe llvm-foreach_target)
3434
get_host_tool_path(llvm-spirv LLVM_SPIRV llvm-spirv_exe llvm-spirv_target)
3535
get_host_tool_path(sycl-post-link SYCL_POST_LINK sycl-post-link_exe sycl-post-link_target)
3636
get_host_tool_path(llvm-link LLVM_LINK llvm-link_exe llvm-link_target)
3737
else()
38-
foreach(tool IN ITEMS clang llvm-ar append-file clang-offload-bundler clang-offload-packager file-table-tform llvm-foreach llvm-spirv sycl-post-link llvm-link)
38+
foreach(tool IN ITEMS clang llvm-ar append-file clang-offload-bundler llvm-offload-binary file-table-tform llvm-foreach llvm-spirv sycl-post-link llvm-link)
3939
find_program(LLVM_CUSTOM_TOOL_${tool} ${tool}
4040
PATHS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
4141
set(${tool}_exe ${LLVM_CUSTOM_TOOL_${tool}})

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ endfunction()
340340
# For cross builds, we also need native versions of the tools.
341341
set(sycl-compiler_deps
342342
sycl-compiler ${clang_target} ${append-file_target}
343-
${clang-offload-bundler_target} ${clang-offload-packager_target}
343+
${clang-offload-bundler_target} ${llvm-offload-binary_target}
344344
${file-table-tform_target} ${llvm-foreach_target} ${llvm-spirv_target}
345345
${sycl-post-link_target})
346346
set(crt_obj_deps wrapper.h device.h spirv_vars.h ${sycl-compiler_deps})

sycl/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ add_custom_target(sycl-compiler
394394
clang-offload-bundler
395395
clang-offload-deps
396396
clang-offload-extract
397-
clang-offload-packager
397+
llvm-offload-binary
398398
clang-linker-wrapper
399399
file-table-tform
400400
llc
@@ -477,7 +477,7 @@ set( SYCL_TOOLCHAIN_DEPLOY_COMPONENTS
477477
clang-offload-bundler
478478
clang-offload-deps
479479
clang-offload-extract
480-
clang-offload-packager
480+
llvm-offload-binary
481481
clang-linker-wrapper
482482
file-table-tform
483483
llc

sycl/doc/design/OffloadDesign.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ host and target device binaries.
5454

5555
When dealing with multiple device binaries, an additional step is performed to
5656
package the multiple device binaries before being added to the host object.
57-
This additional step is performed with the `clang-offload-packager` taking
57+
This additional step is performed with the `llvm-offload-binary` taking
5858
image inputs containing information relating to the target triple,
5959
architecture setting and offloading kind.
6060

61-
The `clang-offload-packager` is run during 'fat object' generation regardless
61+
The `llvm-offload-binary` is run during 'fat object' generation regardless
6262
of the number of device binaries being added to the conglomerate fat object.
6363
The device binaries are contained in what is designated as an ‘Offload Binary’.
6464
These binaries can reside in a variety of binary formats including Bitcode
@@ -69,9 +69,9 @@ We should have the ability to package SPIR-V based device binaries in the
6969
offload section of any given binary. These device binaries will be packaged
7070
as normal with the packager and placed within the given section.
7171

72-
Example usage of the external `clang-offload-packager` call:
72+
Example usage of the external `llvm-offload-binary` call:
7373

74-
`clang-offload-packager --image=file=<name>,triple=<triple>,kind=<kind>`
74+
`llvm-offload-binary --image=file=<name>,triple=<triple>,kind=<kind>`
7575

7676
## Clang Linker Wrapper
7777

sycl/doc/design/SYCLBINDesign.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ in this section. The intention of defining a new format for these is to give
2828
the DPC++ implementation an extendable and lightweight wrapper around the
2929
multiple modules and corresponding metadata captured in the SYCLBIN file.
3030
The content of the SYCLBIN may be contained as an entry in the offloading binary
31-
format produced by the clang-offload-packager, as described in
31+
format produced by the llvm-offload-binary, as described in
3232
[ClangOffloadPackager.rst](https://github.com/intel/llvm/blob/sycl/clang/docs/ClangOffloadPackager.rst).
3333

3434
The format of these files consist of a [file header](#file-header), containing
@@ -221,7 +221,7 @@ The clang driver needs to accept the following new flags:
221221
If this option is set, the output of the invocation is a SYCLBIN file with the
222222
.syclbin file extension. This skips the host-compilation invocation of the
223223
typical `-fsycl` pipeline, instead passing the output of the
224-
clang-offload-packager invocation to clang-linker-wrapper together with the new
224+
llvm-offload-binary invocation to clang-linker-wrapper together with the new
225225
`--syclbin` flag.
226226

227227
Setting this option will override `-fsycl`. Passing`-fsycl-device-only` with

0 commit comments

Comments
 (0)