Skip to content
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

[SR-6829] Expose configuration as compilation condition #4840

Closed
krzyzanowskim opened this issue Jan 24, 2018 · 7 comments
Closed

[SR-6829] Expose configuration as compilation condition #4840

krzyzanowskim opened this issue Jan 24, 2018 · 7 comments
Assignees

Comments

@krzyzanowskim
Copy link
Contributor

Previous ID SR-6829
Radar rdar://problem/36831181
Original Reporter @krzyzanowskim
Type New Feature
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels New Feature, StarterBug
Assignee @krzyzanowskim
Priority Medium

md5: e2e453dd87f87e9ecf62a11e3ddccfc2

Issue Description:

As of today we have

-DXcode

-DSWIFT_PACKAGE

What's missing:

-Drelease

-Ddebug

where "Release" and "Debug" is a Cofiguration enum raw values

This should go to SWIFT_ACTIVE_COMPILATION_CONDITIONS Xcode generated project

Use:

#if release
   // foo
#endif

Rationale:

It is a common practice to enable/disable features or configuration depends on the debug/production build.

@ankitspd
Copy link
Member

I think there was a reason that we didn't do this but I maybe wrong.

/cc @ddunbar

@belkadan
Copy link

Xcode's project templates do have DEBUG for this, I believe, so it wouldn't be too surprising for SwiftPM to provide it.

@ddunbar
Copy link
Member

ddunbar commented Jan 24, 2018

IIRC, swift the compiler didn't want to bake this in, but I agree it is reasonable for us to match precedent with Xcode here.

@ankitspd
Copy link
Member

@swift-ci create

@krzyzanowskim
Copy link
Contributor Author

great, can I make this one?

@ankitspd
Copy link
Member

Sure, just assign it to yourself!

@krzyzanowskim
Copy link
Contributor Author

#1518

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants