-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
add wasm build support #3577
Open
Yuhengwe1
wants to merge
6
commits into
cisco:master
Choose a base branch
from
Yuhengwe1:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
add wasm build support #3577
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
91b8324
add wasm build support
Yuhengwe1 79db3de
add wasm build test action
Yuhengwe1 7fa9e03
change test for wasm
Yuhengwe1 24a19f8
Save xmm7 in DyadicBilinearQuarterDownsampler_sse
randomascii a6cea85
add build flag to fix deadlock
Yuhengwe1 ab46cd1
Merge branch 'master' into master
Yuhengwe1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
#!/bin/sh | ||
cd "$(git rev-parse --show-toplevel 2>/dev/null)" >/dev/null 2>&1 | ||
python build/mktargets.py --directory codec/decoder --library decoder | ||
python build/mktargets.py --directory codec/encoder --library encoder --exclude DllEntry.cpp | ||
python build/mktargets.py --directory codec/common --library common --exclude asm_inc.asm --exclude arm_arch_common_macro.S --exclude arm_arch64_common_macro.S | ||
python build/mktargets.py --directory codec/processing --library processing | ||
python2 build/mktargets.py --directory codec/decoder --library decoder | ||
python2 build/mktargets.py --directory codec/encoder --library encoder --exclude DllEntry.cpp | ||
python2 build/mktargets.py --directory codec/common --library common --exclude asm_inc.asm --exclude arm_arch_common_macro.S --exclude arm_arch64_common_macro.S | ||
python2 build/mktargets.py --directory codec/processing --library processing | ||
|
||
python build/mktargets.py --directory codec/console/dec --binary h264dec | ||
python build/mktargets.py --directory codec/console/enc --binary h264enc | ||
python build/mktargets.py --directory codec/console/common --library console_common | ||
python build/mktargets.py --directory test/encoder --prefix encoder_unittest | ||
python build/mktargets.py --directory test/decoder --prefix decoder_unittest | ||
python build/mktargets.py --directory test/processing --prefix processing_unittest | ||
python build/mktargets.py --directory test/api --prefix api_test | ||
python build/mktargets.py --directory test/common --prefix common_unittest | ||
python build/mktargets.py --directory module --prefix module | ||
python build/mktargets.py --directory gtest/googletest --library gtest --out build/gtest-targets.mk --cpp-suffix .cc --include gtest-all.cc | ||
python2 build/mktargets.py --directory codec/console/dec --binary h264dec | ||
python2 build/mktargets.py --directory codec/console/enc --binary h264enc | ||
python2 build/mktargets.py --directory codec/console/common --library console_common | ||
python2 build/mktargets.py --directory test/encoder --prefix encoder_unittest | ||
python2 build/mktargets.py --directory test/decoder --prefix decoder_unittest | ||
python2 build/mktargets.py --directory test/processing --prefix processing_unittest | ||
python2 build/mktargets.py --directory test/api --prefix api_test | ||
python2 build/mktargets.py --directory test/common --prefix common_unittest | ||
python2 build/mktargets.py --directory module --prefix module | ||
python2 build/mktargets.py --directory gtest/googletest --library gtest --out build/gtest-targets.mk --cpp-suffix .cc --include gtest-all.cc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
include $(SRC_PATH)build/arch.mk | ||
EXEEXT = .html | ||
SHAREDLIBSUFFIX = so | ||
SHAREDLIBSUFFIXFULLVER=$(SHAREDLIBSUFFIX).$(FULL_VERSION) | ||
SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIBSUFFIX).$(SHAREDLIB_MAJORVERSION) | ||
SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) | ||
CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP | ||
# fix undifined symbol: __stack_chk_guard bug | ||
# flags needed to build wasm | ||
CFLAGS += -U_FORTIFY_SOURCE -pthread -DWASMSIMD -msimd128 -sINITIAL_MEMORY=134217728 -sALLOW_MEMORY_GROWTH -sPROXY_TO_PTHREAD -sEXIT_RUNTIME | ||
CXXFLAGS += -U_FORTIFY_SOURCE -pthread -DWASMSIMD -msimd128 -sINITIAL_MEMORY=134217728 -sALLOW_MEMORY_GROWTH -sPROXY_TO_PTHREAD -sEXIT_RUNTIME | ||
LDFLAGS += -U_FORTIFY_SOURCE -pthread -msimd128 -sINITIAL_MEMORY=134217728 -sALLOW_MEMORY_GROWTH -sPROXY_TO_PTHREAD -sEXIT_RUNTIME | ||
ifeq ($(EMFS), nodefs) | ||
CFLAGS += -DNODEFS | ||
CXXFLAGS += -DNODEFS | ||
LDFLAGS += -lnodefs.js | ||
endif | ||
ifeq ($(EMFS), noderawfs) | ||
CFLAGS += -DNODERAWFS | ||
CXXFLAGS += -DNODERAWFS | ||
LDFLAGS += -s NODERAWFS=1 | ||
endif | ||
ifeq ($(EMFS), memfs) | ||
CFLAGS += -DMEMFS | ||
CXXFLAGS += -DMEMFS | ||
LDFLAGS += --preload-file ./testbin/workload | ||
endif | ||
ifeq ($(WASMDEBUG), True) | ||
CFLAGS += -g2 | ||
CXXFLAGS += -g2 | ||
LDFLAGS += -g2 | ||
endif | ||
|
||
STATIC_LDFLAGS += -lm | ||
AR_OPTS = crD $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the
string(CWD) +
needed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the Emscripten File System
node.js environment for example, we map the main project dir to
/workload
in virtual filesystem.After the mount we can run h264enc.js like:
node h264enc.js testbin/xxx.cfg
The
string(CWD) +
add the path prefix. Without it we may need to run h264enc.js likenode h264enc.js workload/testbin/xxx.cfg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why map the main project dir to
/workload
instead of just the/
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I tried to mount host dir
./
to/
in virtual FS for nods.js env, but this will cause error.In browser env, packaging all the main will lead to longer file reading time.