Skip to content

Commit 72173f6

Browse files
committed
Revert "Strip -fPIC compiler flag during compilation (#10209)"
Now that we have landed (for the third time) the binaryen fix for WebAssembly/binaryen#2180 we can once again allow `-fPIC` at compile time as an alternative to MAIN_MODULE or SIDE_MODULE. This reverts commit 19a9e35.
1 parent 8689a54 commit 72173f6

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

Diff for: emcc.py

-3
Original file line numberDiff line numberDiff line change
@@ -1967,9 +1967,6 @@ def is_link_flag(flag):
19671967
return any(flag.startswith(x) for x in ('-l', '-L', '-Wl,'))
19681968

19691969
compile_args = [a for a in newargs if a and not is_link_flag(a)]
1970-
if '-fPIC' in compile_args and not shared.Settings.RELOCATABLE:
1971-
shared.warning('ignoring -fPIC flag when not building with SIDE_MODULE or MAIN_MODULE')
1972-
compile_args.remove('-fPIC')
19731970

19741971
# Bitcode args generation code
19751972
def get_clang_command(input_files):

Diff for: tests/test_core.py

-1
Original file line numberDiff line numberDiff line change
@@ -8593,7 +8593,6 @@ def test_undefined_main(self):
85938593

85948594
def test_fpic_static(self):
85958595
self.emcc_args.append('-fPIC')
8596-
self.emcc_args.remove('-Werror')
85978596
self.do_run_in_out_file_test('tests', 'core', 'test_hello_world')
85988597

85998598
@node_pthreads

0 commit comments

Comments
 (0)