Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI flag for accepting default visibility #947

Open
guybedford opened this issue Mar 15, 2017 · 3 comments
Open

CLI flag for accepting default visibility #947

guybedford opened this issue Mar 15, 2017 · 3 comments

Comments

@guybedford
Copy link

I've implemented this on top of #587 as well as rebasing at master...guybedford:no-export-hidden-update.

This supports the default behaviour of s2wasm, but then provides s2wasm --defaultVisibility to enable the behaviour from #587.

I didn't want to provide a PR, as these seem restricted by the contribution guidelines, but it's working well for me. Just let me know if a PR might be suitable (if I've even done this right!).

Note that when running ./check.py I'm getting the error -

(downloading waterfall 13645: https://storage.googleapis.com/wasm-llvm/builds/mac/13645/wasm-binaries-13645.tbz2)
Traceback (most recent call last):
  File "./check.py", line 24, in <module>
    from scripts.test.shared import (
  File "/Users/guybedford/Projects/binaryen/scripts/test/shared.py", line 235, in <module>
    fetch_waterfall()
  File "/Users/guybedford/Projects/binaryen/scripts/test/shared.py", line 203, in fetch_waterfall
    downloaded = urllib2.urlopen(url).read().strip()
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found

so wasn't able to verify the tests.

@pipcet
Copy link
Contributor

pipcet commented Mar 15, 2017

As for the check.py issue, does check.py --no-test-waterfall work?

@guybedford
Copy link
Author

guybedford commented Mar 15, 2017

@pipcet thanks I managed to get the s2wasm tests to pass that way. Although I still get:

build:  /usr/bin/gcc /Users/guybedford/Projects/binaryen/test/example/c-api-hello-world.c -c -o example.o -I/Users/guybedford/Projects/binaryen/src -g -Lbin/../lib -pthread
clang: warning: argument unused during compilation: '-Lbin/../lib'
   c-api-hello-world.c /Users/guybedford/Projects/binaryen/test/example/c-api-hello-world.c /Users/guybedford/Projects/binaryen/test/example/c-api-hello-world.txt
link:  /usr/bin/g++ -std=c++11 example.o -lbinaryen -I/Users/guybedford/Projects/binaryen/src -g -lasmjs -lsupport -Lbin/../lib -pthread -o bin/example -Wl,-rpath=$ORIGIN/../lib
clang: warning: argument unused during compilation: '-pthread'
ld: unknown option: -rpath=$ORIGIN/../lib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Traceback (most recent call last):
  File "./check.py", line 455, in <module>
    os.remove(output_file)
OSError: [Errno 2] No such file or directory: 'bin/example'

at the end of the test run.

(The above is just my local setup obviously)...

@pipcet
Copy link
Contributor

pipcet commented Mar 15, 2017

That looks like a clang-vs-gcc issue (as used for building binaryen, not for the wasm code :-) ). Does it happen with the vanilla tree? It might be worth filing a separate issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants