Skip to content

Introduce extraCXXFlags, deprecate extraCPPFlags #5827

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

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Oct 19, 2022

Motivation:

Usually, CPP is used as an abbreviation for the C preprocessor, while CXX more commonly refers to the C++ compiler. We also use cxxSettings in Package.swift manifest: https://developer.apple.com/documentation/packagedescription/target/cxxsettings.

Modifications:

For this wider consistency, extraCXXFlags is introduced as a replacement for extraCPPFlags. The latter is then deprecated and is made a computed property that just returns the value of extraCXXFlags.

Result:

Users who are coming from C++ background can be more familiar with the codebase. In the next schema version of destination.json (introduced in a future PR) we can use the new naming as well.

Usually, CPP is used as an abbreviation for the C preprocessor, while CXX is used more commonly to refer to the C++ compiler. For this wider consistency, `extraCXXFlags` can be introduced as a replacement for `extraCPPFlags`.
@MaxDesiatov
Copy link
Contributor Author

@swift-ci please smoke test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci please smoke test macOS

@MaxDesiatov MaxDesiatov merged commit 75877ea into main Oct 20, 2022
@MaxDesiatov MaxDesiatov deleted the maxd/rename-extra-cpp-flags branch October 20, 2022 21:10
MaxDesiatov added a commit that referenced this pull request Nov 15, 2022
Currently, `destination.json` files only support absolute paths, which makes it hard to move cross-compilation sysroots between directories and copying them to different machines.

This change support for relative paths in v2 scheme of `destination.json` files. The path is then normalized relative to the location of `destination.json` file. 

`struct DestinationInfo` is renamed to `DestinationInfoV1`. New `struct DestinationInfoV2` is added to handle the new version that supports relative paths. This is also used as an opportunity to make the schema more consistent with manifests for artifact bundles, in which properties use `camelCase` instead of `dash-case` naming. Also new in schema version 2 are `linkerFlags` and renaming of `extraCPPFlags` to `extraCXXFlags`, to follow up on #5827 and #5837.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants