Prepend -s option when -cmc is not used

Related-To: NEO-5582

- "-s filename" is added to build options
based on filename returned from debugger
- when "-cmc" is passed as first option, do not
modify user options.

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2021-03-01 16:09:19 +01:00
committed by Compute-Runtime-Automation
parent 042e971a93
commit 4191dfdb43
5 changed files with 41 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -129,12 +129,10 @@ cl_int Program::compile(
if (sourceLevelDebuggerNotified[device->getRootDeviceIndex()]) {
continue;
}
appendKernelDebugOptions(*device, internalOptions);
std::string filename;
appendKernelDebugOptions(*device, internalOptions);
notifyDebuggerWithSourceCode(*device, filename);
if (!filename.empty()) {
options = std::string("-s ") + filename + " " + options;
}
prependFilePathToOptions(filename);
sourceLevelDebuggerNotified[device->getRootDeviceIndex()] = true;
}