-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
luajit: add option to build in gc64 mode #20036
Conversation
@DomT4 any idea why this isn't upstream default? |
As far as I'm aware it's an unfinished feature on the 2.1 branch & doesn't exist at all on the stable 2.0.x branch. |
This being closed makes it seem like it's effectively finished: LuaJIT/LuaJIT#25 |
The mailing list is still pretty active in terms of bug reports with this feature, so I would presume it's not "done". Nonetheless if this is added as an option it should be limited to |
Ah. I have no idea how to do that. |
|
Formula/luajit.rb
Outdated
@@ -16,6 +14,12 @@ class Luajit < Formula | |||
devel do | |||
url "https://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz" | |||
sha256 "1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3" | |||
option "with-gc64", "Build with 64-bit support" |
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.
New line between sha256
and the first option
here & inside head do
.
Formula/luajit.rb
Outdated
|
||
cflags = "" | ||
cflags += "-DLUAJIT_ENABLE_LUA52COMPAT " if build.with? "52compat" | ||
cflags += "-DLUAJIT_ENABLE_GC64" if build.with? "gc64" |
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.
Theoretically this should be something like:
cflags << "-DLUAJIT_ENABLE_GC64" if !build.stable && build.with?("gc64")
Formula/luajit.rb
Outdated
cflags += "-DLUAJIT_ENABLE_LUA52COMPAT " if build.with? "52compat" | ||
cflags += "-DLUAJIT_ENABLE_GC64" if build.with? "gc64" | ||
|
||
args << "XCFLAGS=#{cflags}" if cflags != "" |
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.
I'm not sure I love this syntax choice but I'll leave that down to ILZ.
Formula/luajit.rb
Outdated
@@ -35,7 +39,12 @@ def install | |||
ENV.O2 # Respect the developer's choice. | |||
|
|||
args = %W[PREFIX=#{prefix}] | |||
args << "XCFLAGS=-DLUAJIT_ENABLE_LUA52COMPAT" if build.with? "52compat" | |||
|
|||
cflags = "" |
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.
Probably %w[]
rather than ""
.
Thanks @rcombs! |
set branch to v2.1 for head spec
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?brew audit
gives me* devel version should not decrease (from 2.1 to 2.1.0-beta3)
; not sure what's going on there (I didn't touch anything relevant).