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

Allow reconfiguring VM defaults #260

Merged
merged 2 commits into from
Dec 1, 2021

Conversation

kunitoki
Copy link
Contributor

This change allows to configure VM defaults from the build system (with defines -D or /D) without requiring changes to luau source code.

I frequently override LUA_USE_LONGJMP in cmake to build the test suite with and without exceptions, so this comes in handy.

@zeux
Copy link
Collaborator

zeux commented Nov 30, 2021

Mind doing the same with LUA_API as well?

Copy link
Collaborator

@zeux zeux left a comment

Choose a reason for hiding this comment

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

Thanks!

@zeux zeux merged commit 35e497b into luau-lang:master Dec 1, 2021
@kunitoki kunitoki deleted the kraken/configure_luaconf_outside branch December 1, 2021 07:17
@vegorov-rbx
Copy link
Collaborator

I wonder if LUA_SIZECLASSES should be moved somewhere else, reconfiguring it is impossible.

@zeux
Copy link
Collaborator

zeux commented Dec 2, 2021

"Impossible" meaning "something breaks if you change it too much"? We can definitely remove it from luaconf.

@vegorov-rbx
Copy link
Collaborator

If you set it to less than 28, you will need to change size class distribution in lmem.cpp or you'll hit an assertion failure.
I guess it is possible to set it to an arbitrary high value with no specific effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants