Files
compute-runtime/opencl/test/unit_test/offline_compiler/offline_linker_tests.h
Patryk Wrobel 53482e6821 Allow ocloc to link files
Added 'link' option to ocloc CLI, which allows linking of
several IR files to single output file. Supported formats
of output file are ELF and LLVM BC.

Related-To: NEO-6163
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-01-14 16:18:36 +01:00

31 lines
762 B
C++

/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "gmock/gmock.h"
#include "mock/mock_argument_helper.h"
#include "mock/mock_offline_linker.h"
namespace NEO {
class OfflineLinkerTest : public ::testing::Test {
public:
void SetUp() override;
void TearDown() override;
std::string getEmptySpirvFile() const;
std::string getEmptyLlvmBcFile() const;
MockOfflineLinker::InputFileContent createFileContent(const std::string &content, IGC::CodeType::CodeType_t codeType) const;
protected:
MockOclocArgHelper::FilesMap mockArgHelperFilesMap{};
MockOclocArgHelper mockArgHelper{mockArgHelperFilesMap};
char binaryToReturn[8]{7, 7, 7, 7, 0, 1, 2, 3};
};
} // namespace NEO