Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactorenv.h free functions to staticProject class#201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
coder137 merged 11 commits intomainfromstatic_project_class
Mar 27, 2022
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Update toolchain.rst
  • Loading branch information
@coder137
coder137 committedMar 27, 2022
commitffc095aba327b07dfa37c0061f3c62e75ed84773
22 changes: 17 additions & 5 deletionsdocs/source/user_api/toolchain.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,8 +24,6 @@ toolchain_verify.h

.. doxygenstruct:: buildcc::ToolchainCompilerInfo

.. doxygentypedef:: ToolchainVerificationFunc

Example for Default Toolchain
------------------------------

Expand DownExpand Up@@ -62,13 +60,27 @@ Example for Custom Toolchain

BaseToolchain custom_toolchain(ToolchainId::Custom, "custom_new_toolchain", "assembler", "c_compiler", "cpp_compiler", "archiver", "linker");

// Find all the relevant toolchains on your host system
std::vector<fs::path> found_toolchains = custom_toolchain.Find();
// Toolchain::Find similar to previous example

// Find all the relevant toolchains on your host system
// Selects the first found toolchain
// Runs a verification function on the selected toolchain depending on the `ToolchainId`
custom_toolchain.Verify();
Toolchain::AddVerificationFunc(ToolchainId::Custom,
[](const ToolchainExecutables & executables) {
// Use executables to get compiler_version and target_arch
if (success) {
ToolchainCompilerInfo info;
info.compiler_version = "compiler_version";
info.target_arch = "target_arch";
return info;
} else {
return {};
}
} -> std::optional<ToolchainCompilerInfo>, "custom_verification_func")

ToolchainVerifyConfig verify_config;
verify_config.verification_identifier = "custom_verification_func";
custom_toolchain.Verify(verify_config);

Specialized Toolchain
=====================
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp