Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixes configure_library() in configure #3135

Closed
wants to merge 1 commit into from
Closed

Fixes configure_library() in configure #3135

wants to merge 1 commit into from

Conversation

zyxar
Copy link
Contributor

@zyxar zyxar commented Sep 30, 2015

No description provided.

@mscdex mscdex added the build Issues and PRs related to build files or the CI. label Sep 30, 2015
@bnoordhuis
Copy link
Member

Commit log should explain what changed and why, please see CONTRIBUTING.md.

@zyxar
Copy link
Contributor Author

zyxar commented Sep 30, 2015

Shall I close this and resend another PR?

@jbergstroem
Copy link
Member

@zyxar just force push a new commit

@jbergstroem
Copy link
Member

There's some minor fixes needed in the commit message but I can do that later. I just need to sit down and review this properly; will be in a few days though (travelling). We have another similar PR that tries to massage this: #2758.

@@ -731,11 +731,14 @@ def configure_library(lib, output):
if pkg_cflags:
output['include_dirs'] += (
filter(None, map(str.strip, pkg_cflags.split('-I'))))
elif options.__dict__[shared_lib + '_includes']:
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to do shared_lib + '_includes' in options?

Copy link
Member

Choose a reason for hiding this comment

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

I'm inclined to think the __dict__ approach is correct here because it skips over empty flags.

Copy link
Contributor

Choose a reason for hiding this comment

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

@bnoordhuis Oh, you are right. In that case, we can write this as if getattr(options, shared_lib + '_includes'):. But this also will work. So, I think its okay.

filter(None, map(str.strip, pkg_cflags.split('-L'))))
output['libraries'] += [pkg_libpath]
elif options.__dict__[shared_lib + '_libpath']:
output['libraries'] += ['-L%s' % options.__dict__[shared_lib + '_libpath']]
Copy link
Member

Choose a reason for hiding this comment

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

I think this line is just over 80 columns? If so, please wrap it.

@bnoordhuis
Copy link
Member

Basically LGTM. @thefourtheye You want to weigh in?

@jbergstroem
Copy link
Member

I'm way overdue on this. Apologies. I'm ok with as-is since the current state is just incorrect.

@thefourtheye
Copy link
Contributor

LGTM if the CI is green.

@bnoordhuis
Copy link
Member

CI: https://ci.nodejs.org/job/node-test-pull-request/702/

@zyxar Can you fix the style issue (if it is a style issue) and reword the commit log a little? The first line should start with build: and describe the change. Just "fix" is too vague.

@zyxar
Copy link
Contributor Author

zyxar commented Nov 11, 2015

@bnoordhuis Sure. I'd do it soon.

Fixes configure_library() to produce correct LDFLAGS when configuring with
prebuilt 3rd-party libraries (libuv, openssl, etc), either using `pkg-config'
or `--shared-{LIBRARY}-includes=xxx --shared-{LIBRARY}-libpath=xxx'.
bnoordhuis pushed a commit that referenced this pull request Nov 16, 2015
Fix configure_library() to produce correct LDFLAGS when configuring with
prebuilt 3rd-party libraries (libuv, openssl, etc) using `pkg-config' or
`--shared-{LIBRARY}-includes=xxx --shared-{LIBRARY}-libpath=xxx'.

PR-URL: #3135
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@bnoordhuis
Copy link
Member

Thanks Markus, landed in e2eb334.

Just so you know, github doesn't send notifications when you add or amend commits. It's best to notify reviewers by posting a comment afterwards.

@bnoordhuis bnoordhuis closed this Nov 16, 2015
MylesBorins pushed a commit that referenced this pull request Nov 16, 2015
Fix configure_library() to produce correct LDFLAGS when configuring with
prebuilt 3rd-party libraries (libuv, openssl, etc) using `pkg-config' or
`--shared-{LIBRARY}-includes=xxx --shared-{LIBRARY}-libpath=xxx'.

PR-URL: #3135
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@MylesBorins
Copy link
Contributor

landed in lts-v4.x-staging as aef3d54

Fishrock123 pushed a commit that referenced this pull request Nov 17, 2015
Fix configure_library() to produce correct LDFLAGS when configuring with
prebuilt 3rd-party libraries (libuv, openssl, etc) using `pkg-config' or
`--shared-{LIBRARY}-includes=xxx --shared-{LIBRARY}-libpath=xxx'.

PR-URL: #3135
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
rvagg pushed a commit that referenced this pull request Dec 4, 2015
Fix configure_library() to produce correct LDFLAGS when configuring with
prebuilt 3rd-party libraries (libuv, openssl, etc) using `pkg-config' or
`--shared-{LIBRARY}-includes=xxx --shared-{LIBRARY}-libpath=xxx'.

PR-URL: #3135
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@jasnell jasnell mentioned this pull request Dec 17, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
build Issues and PRs related to build files or the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants