Files
sx/library/modules/compiler.sx
agra c027e1969b stdlib: relocate modules under library/
- examples/modules/ -> library/modules/ (top-level, no more
  symlink hacks in consumer projects)
- compiler discovers stdlib via _NSGetExecutablePath / readlink
  /proc/self/exe; searches dev layout (../../library), install
  layout (../library), and alongside-binary fallback
- SX_STDLIB_PATH env var overrides for tests / dev convenience
- SX_DEBUG_STDLIB env var dumps the discovery results
- build.zig installs library/ alongside the binary
- Compilation gains stdlib_paths field threaded through resolveImports
- 50 tests pass; consumer projects can now build from any cwd
2026-05-17 13:49:25 +03:00

16 lines
575 B
Plaintext

OperatingSystem :: enum { macos; linux; windows; wasm; ios; unknown; }
Architecture :: enum { aarch64; x86_64; wasm32; wasm64; unknown; }
OS : OperatingSystem = .unknown;
ARCH : Architecture = .unknown;
POINTER_SIZE : s64 = 8;
BuildOptions :: struct {
add_link_flag :: (self: BuildOptions, flag: [:0]u8) #compiler;
add_framework :: (self: BuildOptions, name: [:0]u8) #compiler;
set_output_path :: (self: BuildOptions, path: [:0]u8) #compiler;
set_wasm_shell :: (self: BuildOptions, path: [:0]u8) #compiler;
}
build_options :: () -> BuildOptions #compiler;