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 static linking in cmake on linux #210 #1457

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from

Conversation

Vlad2001MFS
Copy link
Contributor

@Vlad2001MFS Vlad2001MFS commented Oct 5, 2023

Related to issue #210

@AMS21
Copy link
Contributor

AMS21 commented Dec 6, 2023

Is this still being worked on? I would really like to see something like this merged

@Xottab-DUTY
Copy link
Member

Is this still being worked on? I would really like to see something like this merged

There are static variables that are being automatically added to the list of script export nodes. Linker just throws out these variables, and we didn't found a proper way to fix this yet.

This PR has a workaround for that – just manually specifying all nodes in https://github.com/OpenXRay/xray-16/pull/1457/files#diff-6336379129a38e317e4b780bc63a8bf0e146a9418fc5a7df830132326d261053, which is bad of course.

@AMS21
Copy link
Contributor

AMS21 commented Dec 6, 2023

Alright thanks for the info, maybe I'll try to take a look at it

@AMS21
Copy link
Contributor

AMS21 commented Dec 6, 2023

After some quick searching around I've found the used and retain attributes which seem to do what we need here although retain is only available starting with clang and lld 13 or binutils 2.36 released 2021-01-24 and gcc 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Postponed
Development

Successfully merging this pull request may close these issues.

None yet

3 participants