mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Add warning when device binary had to be recompiled
Introduced a new warning, which is printed to build log, when the binary needs to be recompiled. Added a new flag -Wno-recompiled-from-ir to allow suppression of that message. Removed a bug related to memcpy_s from ModuleBuildLogImp::getString() and aligned it with specification. Related-To: NEO-5819 Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
35f6cd00ee
commit
3599e7aeda
@@ -45,6 +45,28 @@ TEST(CompilerOptions, WhenConcatenateAppendIsCalledThenAddsSpaceAsSeparatorOnlyI
|
||||
EXPECT_STREQ(expected.c_str(), concatenated.c_str());
|
||||
}
|
||||
|
||||
TEST(CompilerOptions, WhenTryingToExtractNonexistentOptionThenFalseIsReturnedAndStringIsNotModified) {
|
||||
const std::string optionsInput{"-ze-allow-zebin -cl-intel-has-buffer-offset-arg"};
|
||||
|
||||
std::string options{optionsInput};
|
||||
const bool wasExtracted{NEO::CompilerOptions::extract(NEO::CompilerOptions::noRecompiledFromIr, options)};
|
||||
|
||||
EXPECT_FALSE(wasExtracted);
|
||||
EXPECT_EQ(optionsInput, options);
|
||||
}
|
||||
|
||||
TEST(CompilerOptions, WhenTryingToExtractOptionThatExistsThenTrueIsReturnedAndStringIsModified) {
|
||||
const std::string optionsInput{"-ze-allow-zebin -Wno-recompiled-from-ir -cl-intel-has-buffer-offset-arg"};
|
||||
|
||||
std::string options{optionsInput};
|
||||
const bool wasExtracted{NEO::CompilerOptions::extract(NEO::CompilerOptions::noRecompiledFromIr, options)};
|
||||
|
||||
EXPECT_TRUE(wasExtracted);
|
||||
|
||||
const std::string expectedOptions{"-ze-allow-zebin -cl-intel-has-buffer-offset-arg"};
|
||||
EXPECT_EQ(expectedOptions, options);
|
||||
}
|
||||
|
||||
TEST(CompilerOptions, WhenCheckingForPresenceOfOptionThenRejectsSubstrings) {
|
||||
EXPECT_FALSE(NEO::CompilerOptions::contains("aaa", "a"));
|
||||
EXPECT_FALSE(NEO::CompilerOptions::contains("aaa", "aa"));
|
||||
|
||||
Reference in New Issue
Block a user