Skip to content

Commit 25ea27e

Browse files
committed
fixed e2e preview tests
1 parent 7f78327 commit 25ea27e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,6 @@ static cl::opt<std::string> PassPipeline(
121121
static cl::alias PassPipeline2("p", cl::aliasopt(PassPipeline),
122122
cl::desc("Alias for -passes"));
123123

124-
static cl::opt<bool>
125-
PreviewBreakingChanges("fpreview-breaking-changes",
126-
cl::desc("Enable preview breaking changes"),
127-
cl::init(false), cl::Hidden);
128-
129124
/// Path of the current binary.
130125
static const char *LinkerExecutable;
131126

@@ -1133,8 +1128,9 @@ wrapSYCLBinariesFromFile(std::vector<module_split::SplitModule> &SplitModules,
11331128
errs() << formatv(" offload-wrapper: compile-opts: {0}, link-opts: {1}\n",
11341129
CompileOptions, LinkOptions);
11351130
}
1136-
if (Error E = offloading::wrapSYCLBinaries(M, Images, WrappingOptions,
1137-
PreviewBreakingChanges))
1131+
if (Error E = offloading::wrapSYCLBinaries(
1132+
M, Images, WrappingOptions,
1133+
Args.hasArg(OPT_preview_breaking_changes)))
11381134
return E;
11391135

11401136
if (Args.hasArg(OPT_print_wrapped_module))

clang/tools/clang-linker-wrapper/LinkerWrapperOpts.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ def should_extract : CommaJoined<["--"], "should-extract=">,
7373
Flags<[WrapperOnlyOption]>, MetaVarName<"<kind=file>">,
7474
HelpText<"Set of device architectures we should always extract if found.">;
7575

76+
def preview_breaking_changes : Flag<["-"], "fpreview-breaking-changes">,
77+
Flags<[WrapperOnlyOption]>,
78+
HelpText<"Enables preview of breaking changes in the wrapper">;
79+
7680
// Flags passed to the device linker.
7781
def arch_EQ : Joined<["--"], "arch=">,
7882
Flags<[DeviceOnlyOption, HelpHidden]>, MetaVarName<"<arch>">,

0 commit comments

Comments
 (0)