Skip to content

Conversation

blaugold
Copy link
Contributor

@blaugold blaugold commented Sep 2, 2023

The rust cc crate provides defaults for passing -fPIC to the compiler that simplify configuration for most use cases. This PR adapts this behavior for CBuilder.

Closes #119

Copy link
Collaborator

@dcharkes dcharkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I know it's still a draft.)

But LGTM.

Please add some more documentation to the PR description that refers to the CC crate using this as default.

@dcharkes
Copy link
Collaborator

dcharkes commented Sep 4, 2023

Please update version number (if necessary) and add a changelog entry.

@@ -3,6 +3,8 @@
- Added `defines` for specifying custom defines.
- Added `buildModeDefine` to toggle define for current build mode.
- Added `ndebugDefine` to toggle define of `NDEBUG` for non-debug builds.
- Generate position independent code for libraries by default and add
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-publishing expects us to publish the first commit with a non -wip suffix. So this has to go in 0.2.2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, when I looked this morning 0.2.1 was not published yet.

Copy link
Contributor Author

@blaugold blaugold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the changelog, but left the version, since 0.2.1 has not been published yet.

@blaugold blaugold marked this pull request as ready for review September 6, 2023 12:14
/// }
/// }
/// ```
String testSuffix(List<Object> tags) => switch (tags) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@dcharkes
Copy link
Collaborator

dcharkes commented Sep 6, 2023

Thanks @blaugold! 🥇

@dcharkes
Copy link
Collaborator

dcharkes commented Sep 6, 2023

cc @devoncarew I think we used to get code-coverage and publisher comments on PRs, but they are not on this PR. Did we change some settings? (The publish comment that has a clickable draft-release link is quite handy!)

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.

Compiling with -fPIC on Linux
2 participants