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

fix "as_needed" flag order #5631

Merged
merged 3 commits into from
Sep 18, 2024
Merged

fix "as_needed" flag order #5631

merged 3 commits into from
Sep 18, 2024

Conversation

KkemChen
Copy link
Contributor

fix "as_needed" flag order

@waruqi waruqi added this to the v2.9.6 milestone Sep 18, 2024
@@ -370,8 +370,8 @@ function nf_linkgroup(self, linkgroup, opt)
end
if as_needed then
Copy link
Member

Choose a reason for hiding this comment

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

为啥启用 as_needed , 反而是 "-Wl,--no-as-needed flags -Wl,--as-needed"? 怪怪的

Copy link
Contributor Author

Choose a reason for hiding this comment

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

因为默认就是 as_needed (只链接实际需要的)
而--no-as-needed 才是全部链接

Copy link
Contributor Author

Choose a reason for hiding this comment

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

或许改下option的名字? as_needed -> no_as_needed

Copy link
Member

Choose a reason for hiding this comment

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

用 false

@@ -368,10 +368,10 @@ function nf_linkgroup(self, linkgroup, opt)
table.insert(prefix_flags, "-Wl,-Bstatic")
table.insert(suffix_flags, 1, "-Wl,-Bdynamic")
end
if as_needed then
if not as_needed then
Copy link
Member

Choose a reason for hiding this comment

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

不能这么判断,没设置 as_needed ,就是 nil,不得一样被设置。。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

所得思呐🤗

@waruqi waruqi merged commit b938556 into xmake-io:dev Sep 18, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants