Commit 8a10725e authored by nagayama15's avatar nagayama15

add: Add the common library target

parent df1c22fa
# 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
)
#include "FunctionOrderingWatermarker.hpp"
namespace kyut::watermarker {
void embedFunctionOrdering(wasm::Module &module, BitStreamReader &stream) {
(void)module;
(void)stream;
}
} // namespace kyut::watermarker
#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
......@@ -2,7 +2,7 @@
#include <wasm-io.h>
#include "kyut/BitStreamReader.hpp"
#include "kyut/watermarker/FunctionOrderingWatermarker.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) {
......
......@@ -4,6 +4,5 @@ add_executable(test_kyut
)
target_link_libraries(test_kyut
fmt::fmt
binaryen::binaryen
kyut
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment