Skip to content

Commit 522df8b

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Test Pyodide builds
1 parent 7c29ac0 commit 522df8b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build_libtcod.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,13 @@ def walk_sources(directory: str) -> Iterator[str]:
195195
MSVC_CFLAGS = {"DEBUG": ["/Od"], "RELEASE": ["/GL", "/O2", "/GS-", "/wd4996"]}
196196
MSVC_LDFLAGS: dict[str, list[str]] = {"DEBUG": [], "RELEASE": ["/LTCG"]}
197197
GCC_CFLAGS = {
198-
"DEBUG": ["-std=c99", "-Og", "-g"],
198+
"DEBUG": ["-std=c99", "-Og", "-g", "-fPIC"],
199199
"RELEASE": [
200200
"-std=c99",
201201
"-flto",
202202
"-O3",
203203
"-g",
204+
"-fPIC",
204205
"-Wno-deprecated-declarations",
205206
"-Wno-discarded-qualifiers", # Ignore discarded restrict qualifiers.
206207
],

build_sdl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def get_emscripten_include_dir() -> Path:
306306
out = subprocess.check_output(["pkg-config", "sdl3", "--cflags"], universal_newlines=True)
307307
except Exception:
308308
if "PYODIDE" in os.environ:
309-
emcc_stdout = subprocess.check_output(["emcc", "--use-port=sdl3", "--cflags"], text=True)
309+
emcc_stdout = subprocess.check_output(["emcc", "-sRELOCATABLE=1", "--use-port=sdl3", "--cflags"], text=True)
310310
print(f"""EMCC CFLAGS: {emcc_stdout}""")
311311
matches = re.findall(r"--sysroot=(\S+)", emcc_stdout)
312312
print(f"{matches=}")

0 commit comments

Comments
 (0)