luau-lang / luau

A fast, small, safe, gradually typed embeddable scripting language derived from Lua
https://luau-lang.org
MIT License
3.79k stars 349 forks source link

XMake build support. #1275

Closed MaxwellGengYF closed 1 month ago

MaxwellGengYF commented 1 month ago

Xmake is a lightweight cross-platform build utility based on Lua: xmake.io

theoparis commented 1 month ago

I'm not a maintainer, however I would love to see this added.

I tried this out myself and realized there is a typo on the luau_codegen target - it is supposed to be CodeGen and not Codegen. After fixing this issue I ran into an issue with the fno-rtti flags specified in xmake_func.lua.

error: Analysis/src/Transpiler.cpp:1185:25: error: 'dynamic_cast' not permitted with '-fno-rtti'

Additionally it seems like add_headerfiles is not used so xmake install will not install the Luau headers to /usr/local/include for example on Linux. I fixed this by adding the following lines to xmake.lua:

add_headerfiles('VM/include/*.h')
add_headerfiles('Compiler/include/*.h')
vegorov-rbx commented 1 month ago

Thank you for your interest in contributing to Luau, but unfortunately, we are not taking in PRs for additional build system support. A new one that we might see in the future will be support for buck2.