Skip to content

Commit 0677db6

Browse files
committed
do not dedup .o when cmake
1 parent b8051f9 commit 0677db6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

emsdk-cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ SKIP = False
127127
COMPILE = False
128128

129129
USE_RAWFS = True
130+
CMAKE = False
130131

131132
out = []
132133
for argc, arg in enumerate(sys.argv):
@@ -135,8 +136,9 @@ for argc, arg in enumerate(sys.argv):
135136
break
136137

137138
if arg.startswith("CMakeFiles/"):
138-
SKIP = True
139-
break
139+
# SKIP = True
140+
# break
141+
CMAKE = True
140142

141143
if arg.startswith('--preload-file') or arg.startswith('--embed-file'):
142144
USE_RAWFS = False
@@ -198,7 +200,7 @@ for argc, arg in enumerate(sys.argv):
198200
LINKING = True
199201

200202
# prevent duplicates objects/archives files on cmdline when linking
201-
if LINKING or MODE == "-o":
203+
if not CMAKE and (LINKING or MODE == "-o"):
202204
if arg.endswith(".a") or arg.endswith(".o") or arg.startswith("-l"):
203205
if arg in out:
204206
continue

0 commit comments

Comments
 (0)