-
-
Notifications
You must be signed in to change notification settings - Fork 23.8k
Fix LibGodot build errors on Linux. #111432
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
Conversation
de2bd50 to
b453f28
Compare
b453f28 to
d3fca68
Compare
d3fca68 to
111fa6e
Compare
|
Should be ready now, apologies for my minor tiff with Git. |
deralmas
left a comment
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.
There might be a cleaner way to do this.
I'm no build system expert, but I suppose that we could at least iterate over source_files and append base in a loop instead of doing it every time?
It's a little more complicated than this because x11 includes a file that actually has an absolute path ( |
Ooooh aight that's fair then. Nw if accounting for it is a mess, it's fine if we append |
|
Hi, I've taken a look at the SCons docs and it looks like we might also use a
Seems quite handy, let me know if that does the job :D |
|
Alright, tried them all :V Github appears to be having technical issues right now so they're not showing up on this page, but here's direct links: I didn't do a "postprocess Path", I could do that too. They're all a little ugly in slightly different ways. I have no strong feelings here. Is there a person I should ping on the build team to figure out which they prefer? Happy to do whatever. |
20e8434 to
1c415dc
Compare
|
Personally I use list each path as a string so things aren't too abstracted, but I'd go with the reviewer commentary. From my point of view I only start looking into optimizations when I have lists of 100s of filepaths. |
This isn't really much of an optimization, more like avoiding to hardcode paths into platforms dirs. While that shouldn't matter, it's still good practice, as platform implementations are supposed to be reasonably self-contained from the rest of the engine. |
|
Yeah, I'm zero-percent concerned about performance here, and one-hundred-percent concerned about code cleanliness. I'm just not sure which of these is the cleanest. |
|
Personally I find this That said I don't really specialize in maintaining the build system so TIWAGOS. The build team already got pinged around thanks to CODEOWNERS but it's also true that most of it is like, perennially busy. |
platform/linuxbsd/x11/SCsub
Outdated
| File("gl_manager_x11_egl.cpp"), | ||
| File("gl_manager_x11.cpp"), | ||
| File("detect_prime_x11.cpp"), | ||
| "#thirdparty/glad/glx.c", |
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.
BTW I Think that it should work for top-relative path names too
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.
Good call, I'll put that in for the sake of consistency.
deralmas
left a comment
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.
Personally, I think that this looks great :D
d66cd80 to
3e00682
Compare
3e00682 to
0a58425
Compare
|
Just gonna squash down to that one then, I think it's probably the best of the batch. |
akien-mga
left a comment
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.
Seems fine.
Repiteo
left a comment
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.
The X11/Wayland SCsub files are definitely unconventional here, but that was apparently already the case, so I won't consider it a blocker. Will absolutely give them a pass in a followup PR though
|
Thanks! |
…x_fix Fix LibGodot build errors on Linux.
This fixes LibGodot shared_library build to work properly on Linux; there was unfortunately some missing functionality in the original PR, #110863.
There's two fixes here:
configure()step so that modules will be built with it.env.Objectbecause it doesn't have the correct flags attached to it; instead they need to be added tolinuxbsd/SCSub'scommon_linuxbsdarray so that add_library, add_shared_library, or add_program can do the right thing. This basically just means that we need to return a path instead of an env.Object, but we do need to wrap it with a constant path to get the right complete filename. (There might be a cleaner way to do this.)I can untangle these into separate PRs if you'd prefer them separate, this is just how I wrote 'em.
To test, run
scons library_type=shared_libraryon Linux. (Shared libraries tend to be the pain point.)