-
-
Notifications
You must be signed in to change notification settings - Fork 784
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
Conversation
@@ -370,8 +370,8 @@ function nf_linkgroup(self, linkgroup, opt) | |||
end | |||
if as_needed then |
There was a problem hiding this comment.
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"
? 怪怪的
There was a problem hiding this comment.
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 才是全部链接
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用 false
xmake/modules/core/tools/gcc.lua
Outdated
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不能这么判断,没设置 as_needed ,就是 nil,不得一样被设置。。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
所得思呐🤗
fix "as_needed" flag order