Skip to content

Commit

Permalink
3.1.74.4pre
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Feb 3, 2025
1 parent a719b3f commit 57576d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
EMFLAVOUR: 3.1.74

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.2.2

- name: Display CI properties
run: |
Expand Down Expand Up @@ -57,13 +57,13 @@ jobs:
bash -c "./python-wasm-sdk.sh"
- name: Upload sdk to Github artifacts
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4
with:
path: /tmp/sdk

- name: Upload sdk to Github Releases
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@2.3.0
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /tmp/sdk/*
Expand Down
14 changes: 6 additions & 8 deletions emsdk-cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ COMMON = arglist(
false = False
true = True

TOGGLED_SHARED = PY_MODULE = IS_SHARED = false
PY_MODULE = IS_SHARED = false
SHARED_TARGET = SHARED = ""

MVP = env("MVP", true)
Expand Down Expand Up @@ -261,6 +261,9 @@ else:

elif not STATIC:
if arg.endswith(".so"):
if not IS_SHARED:
LINKING = True

if arg.startswith("/usr/lib"):
arg = f"-l{arg.rsplit('/',1)[-1][3:-3]}"
if arg in ("-lportmidi", "-lporttime"):
Expand All @@ -269,7 +272,6 @@ else:
if arg.find("wasm32-emscripten.so") > 0 or arg.find("abi3.so") > 0:
PY_MODULE = True
SHARED_TARGET = arg
IS_SHARED = True

# FIX linking .so when it should have been .a for final exe without MAIN_MODULE set
# should be "LINKING" state
Expand All @@ -288,7 +290,6 @@ else:
IS_SHARED = True
continue


# duplicates can happen on cmake/rustc but they are expected to be here for a reason so skip them
if not (CMAKE or NINJA or RUSTC):
# prevent duplicates objects/archives files on cmdline when linking
Expand Down Expand Up @@ -409,11 +410,8 @@ else:
if SIZEOPT and ("-sENVIRONMENT=web" not in out):
final.append("-sENVIRONMENT=web")


if IS_SHARED and not TOGGLED_SHARED:
TOGGLED_SHARED = True
SHARED = f"-shared -sASSERTIONS=0 -sSIDE_MODULE=1 -L{PREFIX}/lib"

if IS_SHARED or (LINKING and PYMODULE):
SHARED = f"-shared -sASSERTIONS=0 -sSIDE_MODULE=1"

# maybe not pass all WASM opts when -c + -o but always PIC and opt level
final.extend(arglist("-fPIC", SHARED, COPTS))
Expand Down

0 comments on commit 57576d6

Please sign in to comment.