Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wasm-watermarker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nagayama15
wasm-watermarker
Commits
8a10725e
Commit
8a10725e
authored
Jul 08, 2019
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: Add the common library target
parent
df1c22fa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
11 deletions
+32
-11
CMakeLists.txt
src/CMakeLists.txt
+8
-8
FunctionOrderingWatermarker.cpp
src/kyut/watermarker/FunctionOrderingWatermarker.cpp
+8
-0
FunctionOrderingWatermarker.hpp
src/kyut/watermarker/FunctionOrderingWatermarker.hpp
+12
-0
snpi.cpp
src/snpi.cpp
+3
-1
CMakeLists.txt
test/CMakeLists.txt
+1
-2
No files found.
src/CMakeLists.txt
View file @
8a10725e
# add_library(kthr
# )
add_library
(
kyut
kyut/watermarker/FunctionOrderingWatermarker.cpp
)
# target_link_libraries(kthr
# binaryen::binaryen
# fmt::fmt
#
)
target_link_libraries
(
kyut
fmt::fmt
binaryen::binaryen
)
add_executable
(
snpi
snpi.cpp
)
target_link_libraries
(
snpi
fmt::fmt
binaryen::binaryen
kyut
)
src/kyut/watermarker/FunctionOrderingWatermarker.cpp
0 → 100644
View file @
8a10725e
#include "FunctionOrderingWatermarker.hpp"
namespace
kyut
::
watermarker
{
void
embedFunctionOrdering
(
wasm
::
Module
&
module
,
BitStreamReader
&
stream
)
{
(
void
)
module
;
(
void
)
stream
;
}
}
// namespace kyut::watermarker
src/kyut/watermarker/FunctionOrderingWatermarker.hpp
0 → 100644
View file @
8a10725e
#ifndef INCLUDE_kyut_watermark_FunctionOrderingWatermarker_hpp
#define INCLUDE_kyut_watermark_FunctionOrderingWatermarker_hpp
#include <wasm.h>
#include "../BitStreamReader.hpp"
namespace
kyut
::
watermarker
{
void
embedFunctionOrdering
(
wasm
::
Module
&
module
,
BitStreamReader
&
stream
);
}
#endif // INCLUDE_kyut_watermark_FunctionOrderingWatermarker_hpp
src/snpi.cpp
View file @
8a10725e
...
...
@@ -2,7 +2,7 @@
#include <wasm-io.h>
#include "kyut/
BitStreamRead
er.hpp"
#include "kyut/
watermarker/FunctionOrderingWatermark
er.hpp"
int
main
(
int
argc
,
char
*
argv
[])
{
// Parse command line options
...
...
@@ -23,6 +23,8 @@ int main(int argc, char *argv[]) {
// Embed watermarks
const
auto
stream
=
kyut
::
BitStreamReader
::
fromString
(
watermark
);
kyut
::
watermarker
::
embedFunctionOrdering
(
module
,
*
stream
);
// Output the result
wasm
::
ModuleWriter
{}.
writeText
(
module
,
""
);
}
catch
(
const
wasm
::
ParseException
&
e
)
{
...
...
test/CMakeLists.txt
View file @
8a10725e
...
...
@@ -4,6 +4,5 @@ add_executable(test_kyut
)
target_link_libraries
(
test_kyut
fmt::fmt
binaryen::binaryen
kyut
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment