Mercurial
diff third_party/raylib/raylib.bzl @ 186:8cf4ec5e2191 hg-web
Fixed merge conflict.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 22:38:59 -0800 |
| parents | 94705b5986b3 |
| children |
line wrap: on
line diff
--- a/third_party/raylib/raylib.bzl Wed Jan 21 19:32:08 2026 -0800 +++ b/third_party/raylib/raylib.bzl Fri Jan 23 22:38:59 2026 -0800 @@ -1,3 +1,5 @@ +load("@rules_cc//cc:cc_binary.bzl", "cc_binary") + def raylib_binary( name, srcs, @@ -27,6 +29,12 @@ "/DEFAULTLIB:user32.lib", "/DEFAULTLIB:shell32.lib", ], + # I am not sure what these do lol + linkopts_wasm = [ + "-sUSE_GLFW=3", # Tells Emscripten to provide GLFW3 compatibility + "-sUSE_WEBGL2=1", # Enables WebGL2 support + "-sASYNCIFY", # Often needed for Raylib's main loop if not using emscripten_set_main_loop + ], static = False ): """ @@ -43,7 +51,7 @@ linkopts_windows: Extra linkopts for Windows. static: Make build executable static """ - native.cc_binary( + cc_binary( name = name, srcs = srcs, data = data, @@ -57,7 +65,7 @@ "//config:macos": linkopts_macos, "//config:linux": linkopts_linux, "//config:windows": linkopts_windows, - "//conditions:default": [], + "//conditions:default": linkopts_wasm, }), linkstatic = static, )