Skip to content

Commit

Permalink
cpython: use llvm native version for native compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
csegarragonz committed Feb 22, 2024
1 parent ad7700b commit 66fdd6e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tasks/cpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
get_faasm_build_env_dict
)
from faasmtools.compile_util import wasm_cmake, wasm_copy_upload
from faasmtools.env import LLVM_VERSION, WASM_DIR
from faasmtools.env import LLVM_NATIVE_VERSION, WASM_DIR
from invoke import task
from os import environ, makedirs
from os.path import join, exists
Expand Down Expand Up @@ -189,13 +189,13 @@ def native(ctx, clean=False):
run("wget {}".format(tar_url), shell=True, check=True, cwd=workdir)
run("tar -xf {}".format(tar_name), shell=True, check=True, cwd=workdir)

llvm_version_major = LLVM_VERSION.split(".")[0]
llvm_native_version_major = LLVM_NATIVE_VERSION.split(".")[0]
workdir = join(workdir, PYTHON_VERSION)
native_configure_cmd = [
'CC="clang-{}"'.format(llvm_version_major),
'CXX="clang++-{}"'.format(llvm_version_major),
'CC="clang-{}"'.format(llvm_native_version_major),
'CXX="clang++-{}"'.format(llvm_native_version_major),
'CFLAGS="-O3 -DANSI"',
'LD="clang-{}"'.format(llvm_version_major),
'LD="clang-{}"'.format(llvm_native_version_major),
"./configure",
"--prefix={}".format(PYTHON_INSTALL_DIR),
]
Expand Down

0 comments on commit 66fdd6e

Please sign in to comment.