diff options
author | Blaine Bublitz <blaine.bublitz@gmail.com> | 2022-01-04 09:51:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-04 08:51:41 -0800 |
commit | 1980e5570bce241945360abe8105101019f64bc6 (patch) | |
tree | 806f6d9e0efae183cad36c353fc899c673a96128 /scripts/embedwat.py | |
parent | 6137b338c7fb37ba98b63c31225ec9cfda8cfa59 (diff) | |
download | binaryen-1980e5570bce241945360abe8105101019f64bc6.tar.gz binaryen-1980e5570bce241945360abe8105101019f64bc6.tar.bz2 binaryen-1980e5570bce241945360abe8105101019f64bc6.zip |
Remove python from CMake build (#4324)
Use CMake's configure_file() instead.
Diffstat (limited to 'scripts/embedwat.py')
-rwxr-xr-x | scripts/embedwat.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/scripts/embedwat.py b/scripts/embedwat.py deleted file mode 100755 index 5b0809b26..000000000 --- a/scripts/embedwat.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright 2018 WebAssembly Community Group participants -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import sys - -input_file = sys.argv[1] -output_file = sys.argv[2] - -with open(input_file) as f: - wat = f.read() - -output = """\ -// Automatically generated by embedwat.py - -#include "passes/intrinsics-module.h" - -static const char theModule[%d] = { -""" % (len(wat) + 1) - -for c in wat: - output += str(ord(c)) + ', ' - -output += '''0 -}; - -namespace wasm { -const char* IntrinsicsModuleWast = theModule; -} -''' - -with open(output_file, 'w') as f: - f.write(output) |