Skip to content

Commit b420bc6

Browse files
Revert "Fix ocloc options parsing"
This reverts commit ef7a6763cb3e7389542a818e58b3c200b178bc46. Signed-off-by: Mateusz Hoppe <[email protected]>
1 parent c8e79b7 commit b420bc6

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

opencl/test/unit_test/offline_compiler/offline_compiler_tests.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -370,25 +370,6 @@ TEST_F(OfflineCompilerTests, givenDebugOptionThenInternalOptionShouldContainKern
370370
EXPECT_THAT(internalOptions, ::testing::HasSubstr("-cl-kernel-debug-enable"));
371371
}
372372

373-
TEST_F(OfflineCompilerTests, givenDashGInBiggerOptionStringWhenInitializingThenInternalOptionsShouldNotContainKernelDebugEnable) {
374-
375-
std::vector<std::string> argv = {
376-
"ocloc",
377-
"-options",
378-
"-gNotRealDashGOption",
379-
"-file",
380-
"test_files/copybuffer.cl",
381-
"-device",
382-
gEnvironment->devicePrefix.c_str()};
383-
384-
auto mockOfflineCompiler = std::unique_ptr<MockOfflineCompiler>(new MockOfflineCompiler());
385-
ASSERT_NE(nullptr, mockOfflineCompiler);
386-
mockOfflineCompiler->initialize(argv.size(), argv);
387-
388-
std::string internalOptions = mockOfflineCompiler->internalOptions;
389-
EXPECT_THAT(internalOptions, ::testing::Not(::testing::HasSubstr("-cl-kernel-debug-enable")));
390-
}
391-
392373
TEST_F(OfflineCompilerTests, givenVariousClStdValuesWhenCompilingSourceThenCorrectExtensionsArePassed) {
393374
std::string clStdOptionValues[] = {"", "-cl-std=CL1.2", "-cl-std=CL2.0", "-cl-std=CL3.0"};
394375

shared/offline_compiler/source/offline_compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ int OfflineCompiler::initialize(size_t numArgs, const std::vector<std::string> &
449449
return retVal;
450450
}
451451

452-
if (CompilerOptions::contains(options, CompilerOptions::generateDebugInfo.str())) {
452+
if (options.find(CompilerOptions::generateDebugInfo.str()) != std::string::npos) {
453453
if (hwInfo.platform.eRenderCoreFamily >= IGFX_GEN9_CORE) {
454454
internalOptions = CompilerOptions::concatenate(internalOptions, CompilerOptions::debugKernelEnable);
455455
}

0 commit comments

Comments
 (0)