- Notifications
You must be signed in to change notification settings - Fork3
Toolchain find and verify#199
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
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
46 commits Select commitHold shift + click to select a range
ea827b1 Added Toolchain find CRTP
coder137413c8f8 Added test_toolchain_find
coder137c4897a2 Update toolchain_find.cpp
coder137b6ee925 Update test_toolchain_find.cpp
coder137b4a2ff6 Updated toolchain_find API
coder137b127cf6 Update toolchain_find.h
coder137920933e Updated toolchain_verify API
coder137486b5c3 Update test_toolchain_verify.cpp
coder13736572e3 Updated toolchain find
coder137bcd1bcb Update toolchain_find.h
coder13717c6317 Update toolchain.h
coder137d9bfeda Updated toolchain_verify API
coder1377a5b3dc Update toolchain_setup.cpp
coder1375c69b31 Update build.cpp
coder1370c71f62 Update test_toolchain_verify.cpp
coder137cadd0d1 Updated function prototype for VerifySelectedToolchainPath
coder13758fc928 Updated VerifySelectedToolchainPath
coder137b0a6c54 Update toolchain_verify.cpp
coder137f550747 Updated specialized toolchains
coder137b4098bb Renamed ToolchainBinaries to ToolchainExecutables
coder137cf4326f Updated specialized toolchains
coder137c5b2f9e Updated toolchains for virtual functions
coder137dc68087 Update args.h
coder137d2dce4f Renamed binaries to executables
coder13715db5ea Update args.cpp
coder1371a7962d Update test_args.cpp
coder13772234c5 Update toolchain_find.cpp
coder13792ab70e Added toolchain_executables and toolchain_id header files
coder137ac079bb Updated toolchain.h
coder137aa606f8 Updated toolchain.cpp
coder137f7cfb77 Updated toolchain_verify
coder137455b54e Updated tests
coder13779c07f8 Updated specialized_toolchains
coder137490d12c Update toolchain_verify.cpp
coder137da33d91 Updated buildexe with toolchain.Verify
coder1371030886 Update toolchain_id.h
coder13775e7813 Added test_toolchain_id
coder1375e972cb Update test_toolchain_verify.cpp
coder13774e8060 Update toolchain_verify.cpp
coder137f05e415 Update test_toolchain_verify.cpp
coder1376fb51b2 Update test_toolchain_verify.cpp
coder137eaa57fd Updated test_toolchain_verify for custom toolchains
coder137c566b8e Update test_toolchain_verify.cpp
coder137b0eff94 Update toolchain_verify.h
coder1373db102a Update test_toolchain_verify.cpp
coder1372eaaec9 Updated GetStatic function
coder137File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
14 changes: 7 additions & 7 deletionsbuildcc/lib/args/include/args/args.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletionsbuildcc/lib/args/src/args.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
60 changes: 30 additions & 30 deletionsbuildcc/lib/args/test/test_args.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionsbuildcc/lib/target/test/target/test_toolchain_flag_api.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
34 changes: 26 additions & 8 deletionsbuildcc/lib/toolchain/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletionsbuildcc/lib/toolchain/include/toolchain/api/toolchain_find.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| /* | ||
| * Copyright 2021-2022 Niket Naidu. All rights reserved. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| #ifndef TOOLCHAIN_TOOLCHAIN_FIND_H_ | ||
| #define TOOLCHAIN_TOOLCHAIN_FIND_H_ | ||
| #include <filesystem> | ||
| #include <string> | ||
| #include <unordered_set> | ||
| #include <vector> | ||
| #include "schema/path.h" | ||
| namespace fs = std::filesystem; | ||
| namespace buildcc { | ||
| /** | ||
| * @brief Configure the behaviour of Toolchain::Find API. By default searches | ||
| * the directories mentioned in the ENV{PATH} variable to find the toolchain. | ||
| * @param absolute_search_paths absolute_search_paths expect directories that | ||
| * are iterated for exact toolchain matches | ||
| * @param env_vars env_vars contain paths that are seperated by OS delimiter. | ||
| * These are converted to paths and searched similarly to absolute_search_paths | ||
| * <br> | ||
| * NOTE: env_vars must contain single absolute paths or multiple absolute | ||
| * paths seperated by OS delimiter <br> | ||
| * Example: [Windows] "absolute_path_1;absolute_path_2;..." <br> | ||
| * Example: [Linux] "absolute_path_1:absolute_path_2:..." <br> | ||
| */ | ||
| struct ToolchainFindConfig { | ||
| ToolchainFindConfig( | ||
| const std::unordered_set<std::string> &env_vars = {"PATH"}, | ||
| const fs_unordered_set &absolute_search_paths = {}) | ||
| : env_vars(env_vars), absolute_search_paths(absolute_search_paths) {} | ||
| std::unordered_set<std::string> env_vars; | ||
| fs_unordered_set absolute_search_paths; | ||
| }; | ||
| template <typename T> class ToolchainFind { | ||
| public: | ||
| std::vector<fs::path> | ||
| Find(const ToolchainFindConfig &config = ToolchainFindConfig()) const; | ||
| }; | ||
| } // namespace buildcc | ||
| #endif |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.