Skip to content

Commit 426b729

Browse files
committed
still support -Wno-warn-absolute-paths emscripten-core#3833
1 parent 15d592f commit 426b729

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

emcc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,11 @@ try:
446446
if newargs[i] == '-Wwarn-absolute-paths':
447447
newargs[i] = ''
448448
absolute_warning_shown = False
449-
# Scan for individual -l/-L/-I arguments and concatenate the next arg on if there is no suffix
450-
if newargs[i] in ['-l', '-L', '-I']:
449+
elif newargs[i] == '-Wno-warn-absolute-paths':
450+
newargs[i] = ''
451+
absolute_warning_shown = True
452+
elif newargs[i] in ['-l', '-L', '-I']:
453+
# Scan for individual -l/-L/-I arguments and concatenate the next arg on if there is no suffix
451454
newargs[i] += newargs[i+1]
452455
newargs[i+1] = ''
453456

tests/test_other.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,11 +1040,18 @@ def test_abspaths(self):
10401040
(['-L/usr/something', '-Wwarn-absolute-paths'], True),
10411041
(['-I/usr/something'], False),
10421042
(['-L/usr/something'], False),
1043+
(['-I/usr/something', '-Wno-warn-absolute-paths'], False),
1044+
(['-L/usr/something', '-Wno-warn-absolute-paths'], False),
10431045
(['-Isubdir/something', '-Wwarn-absolute-paths'], False),
10441046
(['-Lsubdir/something', '-Wwarn-absolute-paths'], False),
10451047
([], False)]:
1046-
err = Popen([PYTHON, EMCC, 'main.c'] + args, stderr=PIPE).communicate()[1]
1048+
print args, expected
1049+
proc = Popen([PYTHON, EMCC, 'main.c'] + args, stderr=PIPE)
1050+
err = proc.communicate()[1]
1051+
assert proc.returncode is 0
10471052
assert ('encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript)' in err) == expected, err
1053+
if not expected:
1054+
assert err == '', err
10481055

10491056
def test_local_link(self):
10501057
# Linking a local library directly, like /usr/lib/libsomething.so, cannot work of course since it

0 commit comments

Comments
 (0)