# Copyright (c) 2021 Huawei Device Co., Ltd. # 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. from platform import system import os import sys thisFile = os.getenv('EM_CONFIG') if thisFile is None: sys.stderr.write('No EM_CONFIG in .emscripten file\n') sys.exit(-1) rootDir = os.path.dirname(os.path.dirname(thisFile)) emsdkPath = os.path.join(rootDir, 'prebuilts/emsdk/emsdk') nodePath = os.path.join(rootDir, 'prebuilts/emsdk/node/16.20.0_64bit') LLVM_ROOT = os.path.join(emsdkPath, 'bin') NODE_JS = os.path.join(nodePath, 'bin/node') EMSCRIPTEN_ROOT = os.path.join(emsdkPath, 'emscripten') COMPILER_ENGINE = NODE_JS JS_ENGINES = [NODE_JS] BINARYEN_ROOT = emsdkPath