-
Notifications
You must be signed in to change notification settings - Fork 980
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework QbsProfile #16742
Merged
Merged
Rework QbsProfile #16742
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5fefc1a
rework qbs profile
ABBAPOH c9741d5
Merge branch 'develop2' into qbsprofile
ABBAPOH 6b0814f
fix imports
ABBAPOH 56e292d
docstrings
ABBAPOH ba0909c
use flags from conf instead of env
ABBAPOH 170e488
Allow to override extra flags
ABBAPOH 8d3d6e8
support sysroot
ABBAPOH 1472762
Merge branch 'develop2' into qbsprofile
memsharded 57e9418
fix _vcvars_versions
ABBAPOH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from conan.tools.qbs.qbs import Qbs | ||
from conan.tools.qbs.qbsdeps import QbsDeps | ||
from conan.tools.qbs.qbsprofile import QbsProfile |
This file contains 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,87 @@ | ||
architecture_map = { | ||
'x86': 'x86', | ||
'x86_64': 'x86_64', | ||
'ppc32be': 'ppc', | ||
'ppc32': 'ppc', | ||
'ppc64le': 'ppc64', | ||
'ppc64': 'ppc64', | ||
'armv4': 'arm', | ||
'armv4i': 'arm', | ||
'armv5el': 'arm', | ||
'armv5hf': 'arm', | ||
'armv6': 'arm', | ||
'armv7': 'arm', | ||
'armv7hf': 'arm', | ||
'armv7s': 'arm', | ||
'armv7k': 'arm', | ||
'armv8': 'arm64', | ||
'armv8_32': 'arm64', | ||
'armv8.3': 'arm64', | ||
'sparc': 'sparc', | ||
'sparcv9': 'sparc64', | ||
'mips': 'mips', | ||
'mips64': 'mips64', | ||
'avr': 'avr', | ||
's390': 's390x', | ||
's390x': 's390x', | ||
'asm.js': None, | ||
'wasm': None, | ||
'sh4le': 'sh' | ||
} | ||
|
||
|
||
build_variant_map = { | ||
'Debug': 'debug', | ||
'Release': 'release', | ||
'RelWithDebInfo': 'profiling', | ||
'MinSizeRel': 'release' | ||
} | ||
|
||
|
||
optimization_map = { | ||
'MinSizeRel': 'small' | ||
} | ||
|
||
|
||
cxx_language_version_map = { | ||
'98': 'c++98', | ||
'gnu98': 'c++98', | ||
'11': 'c++11', | ||
'gnu11': 'c++11', | ||
'14': 'c++14', | ||
'gnu14': 'c++14', | ||
'17': 'c++17', | ||
'gnu17': 'c++17', | ||
'20': 'c++20', | ||
'gnu20': 'c++20' | ||
} | ||
|
||
|
||
target_platform_map = { | ||
'Windows': 'windows', | ||
'WindowsStore': 'windows', | ||
'WindowsCE': 'windows', | ||
'Linux': 'linux', | ||
'Macos': 'macos', | ||
'Android': 'android', | ||
'iOS': 'ios', | ||
'watchOS': 'watchos', | ||
'tvOS': 'tvos', | ||
'visionOS': 'xros', | ||
'FreeBSD': 'freebsd', | ||
'SunOS': 'solaris', | ||
'AIX': 'aix', | ||
'Emscripten': None, | ||
'Arduino': 'none', | ||
'Neutrino': 'qnx', | ||
} | ||
|
||
|
||
runtime_library_map = { | ||
'static': 'static', | ||
'dynamic': 'dynamic', | ||
'MD': 'dynamic', | ||
'MT': 'static', | ||
'MDd': 'dynamic', | ||
'MTd': 'static', | ||
} |
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This settings-dir is something new, I don't fully understand the connection to the QbsProfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qbs settings is a collection profiles (as well which profile is default). Profile is similar to Conan profile, just a bunch of toolchain properties.
Settings are stored in an ini file on win/linux or in a plist file on Mac (in a dir controlled by the --settings-dir flag). Because of that plist, we can't write them directly from Conan (would require a new dependency) so I write settings in an intermediate text file in this dir that is later imported using
qbs config --import
and converted to an inner (ini/plist) format. I suppose I can change the inner format to JSON or use ini on all platforms in Qbs, but that won't work with old Qbs versions anyway; this hacky solution does.