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 target_link_libraries(kyut
# binaryen::binaryen fmt::fmt
# fmt::fmt binaryen::binaryen
# ) )
add_executable(snpi add_executable(snpi
snpi.cpp snpi.cpp
) )
target_link_libraries(snpi target_link_libraries(snpi
fmt::fmt kyut
binaryen::binaryen
) )
#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 @@ ...@@ -2,7 +2,7 @@
#include <wasm-io.h> #include <wasm-io.h>
#include "kyut/BitStreamReader.hpp" #include "kyut/watermarker/FunctionOrderingWatermarker.hpp"
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
// Parse command line options // Parse command line options
...@@ -23,6 +23,8 @@ int main(int argc, char *argv[]) { ...@@ -23,6 +23,8 @@ int main(int argc, char *argv[]) {
// Embed watermarks // Embed watermarks
const auto stream = kyut::BitStreamReader::fromString(watermark); const auto stream = kyut::BitStreamReader::fromString(watermark);
kyut::watermarker::embedFunctionOrdering(module, *stream);
// Output the result // Output the result
wasm::ModuleWriter{}.writeText(module, ""); wasm::ModuleWriter{}.writeText(module, "");
} catch (const wasm::ParseException &e) { } catch (const wasm::ParseException &e) {
......
...@@ -4,6 +4,5 @@ add_executable(test_kyut ...@@ -4,6 +4,5 @@ add_executable(test_kyut
) )
target_link_libraries(test_kyut target_link_libraries(test_kyut
fmt::fmt kyut
binaryen::binaryen
) )
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