GCC Code Coverage Report


Directory: ../
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 1 / 0 / 1
Functions: 100.0% 1 / 0 / 1
Branches: -% 0 / 0 / 0

src/linker/ExternalLinkerInterface.h
Line Branch Exec Source
1 // Copyright (c) 2021-2026 ChilliBits. All rights reserved.
2
3 #pragma once
4
5 #include <filesystem>
6 #include <string>
7 #include <vector>
8
9 #include <driver/Driver.h>
10
11 namespace spice::compiler {
12
13 class ExternalLinkerInterface {
14 public:
15 // Constructors
16 443 explicit ExternalLinkerInterface(const CliOptions &cliOptions) : outputPath(cliOptions.outputPath), cliOptions(cliOptions) {}
17
18 // Public methods
19 void prepare();
20 void link() const;
21 void addObjectFilePath(const std::string &objectFilePath);
22 void addLinkerFlag(const std::string &flag);
23 void addAdditionalSourcePath(std::filesystem::path additionalSource);
24 void requestLibMathLinkage();
25
26 // Public members
27 std::filesystem::path outputPath;
28
29 private:
30 // Members
31 const CliOptions &cliOptions;
32 std::vector<std::string> objectFilePaths;
33 std::vector<std::string> linkerFlags;
34 bool linkLibMath = false;
35 };
36
37 } // namespace spice::compiler
38