Skip to content

Linux build fix - #60

Merged
Pursche merged 4 commits into
masterfrom
LinuxBuildFix
Aug 10, 2026
Merged

Linux build fix#60
Pursche merged 4 commits into
masterfrom
LinuxBuildFix

Conversation

@Pursche

@Pursche Pursche commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Compile fixes for clang/libstdc++ (MSVC-isms that never surfaced on Windows):
- File.cpp: add missing <thread> include for std::this_thread::yield
- SlangBridge.cpp: drop invalid constexpr from function calling strcmp
- GameMessageRouter.h: resolve opcode parameter/local name collision in
  UnregisterPacketHandler (template was never instantiated on MSVC)
- Platform.h: use standard _Pragma for clang; __pragma is MSVC-only and
  clang only accepts it in MS-compat mode
- SpirvReflect.h: restore upstream SPIRV-Reflect include
  <spirv/unified1/spirv.h>; the spirv-headers/ prefix only exists in the
  Windows Vulkan SDK layout

Correctness fixes:
- Types.h: DECLARE_GENERIC_BITWISE_OPERATORS compound operators
  reinterpreted small enums through (i32&), a strict-aliasing violation
  and out-of-bounds RMW; clang's TBAA legally dropped the stores (u8
  BufferPassUsage flags stayed NONE and tripped render-graph asserts).
  Rewritten with value semantics, identical behavior on MSVC.
- Zenith.cpp: ToInteger/ToUnsigned returned 0 for plain Lua numbers;
  fall back to lua_tonumber when the value is not integer-tagged
  (standard lua_tointegerx semantics)

Build system fixes:
- ProjectUtil.lua: enable linkgroups on Linux (GNU ld resolves static
  libs left-to-right; the dependency sort does not fully topo-order),
  add $ORIGIN rpath so executables find bundled shared libs, and fix
  the executable extension map (Linux executables have no extension)
- libsodium.lua: link system libsodium as -lsodium on Linux
- slang.lua: copy the full libslang* runtime family (libslang.so's
  SONAME points at libslang-compiler.so) into both the Engine and root
  project bin dirs
Integers in this Luau fork are a first-class 64-bit language type, not a
host-side conversion convenience. The strict tag-only read in
lua_tointeger64 is intentional: implicitly converting plain doubles
would blur the type boundary and silently lose precision past 2^53.
The failing automation test read double-typed globals through the
integer API; the test is being fixed to use integer literals instead.

This reverts the Zenith.cpp hunk of d6753b1.
@Pursche
Pursche merged commit 2a8e592 into master Aug 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants