Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLVM] Basic scalable vector support draft #676

Draft
wants to merge 73 commits into
base: llvm
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
16d3cab
Disable python bindings for faster build
pramodk Nov 27, 2020
b1cfda6
Integrate LLVM into CMake build system
pramodk Nov 28, 2020
46d4779
Code infrastructure for LLVM code generation backend
pramodk Nov 28, 2020
51987dc
Azure CI fixes for LLVM build and README update
pramodk Nov 28, 2020
ae07ce4
Print build status after cmake configure stage
pramodk Nov 29, 2020
c540fb1
Adding test template for LLVM codegen
pramodk Nov 29, 2020
724605c
Initial LLVM codegen vistor routines (#457)
georgemitenkov Dec 22, 2020
b621d4e
FunctionBlock code generation and terminator checks (#470)
georgemitenkov Dec 25, 2020
917a7da
Add option to run LLVM optimisation passes (#471)
pramodk Dec 28, 2020
b261ba9
Add function call LLVM code generation (#477)
georgemitenkov Dec 30, 2020
7884de8
Support for IndexedName codegen (#478)
georgemitenkov Dec 30, 2020
dbda271
Improvements for code generation specific transformations (#483)
pramodk Jan 6, 2021
83abf60
nrn_state function generation in NMODL AST to help LLVM codegen (#484)
pramodk Jan 6, 2021
bcc091b
Running functions from MOD files via LLVM JIT (#482)
georgemitenkov Jan 8, 2021
838ed6f
Extended support for binary ops and refactoring (#489)
georgemitenkov Jan 12, 2021
eaeb7aa
Avoid converting LOCAL statement in all StatementBlocks (#492)
pramodk Jan 12, 2021
6d60ca9
Handle CodegenVarType type in JSON printer (#494)
pramodk Jan 13, 2021
5b32b31
Integrating LLVM helper into LLVM visitor (#497)
georgemitenkov Jan 25, 2021
bc305ba
LLVM code generation for if/else statements (#499)
georgemitenkov Jan 25, 2021
c8ea994
Added error handling for values not in scope (#502)
georgemitenkov Jan 26, 2021
a32f76b
Added support for WHILE statement (#501)
georgemitenkov Jan 26, 2021
bfaff72
Create mechanism instance struct in LLVM IR (#507)
iomaganaris Feb 1, 2021
b690961
Printf support in LLVM IR codegen (#510)
georgemitenkov Feb 3, 2021
a561c97
Fix issue error: ‘runtime_error’ is not a member of ‘std’ (#512)
iomaganaris Feb 15, 2021
5c80684
Move code gen specific InstanceStruct node to codegen.yaml (#526)
pramodk Mar 5, 2021
5b72bc3
* Improvements to codegen helper (Part I)
pramodk Feb 27, 2021
4b3e2fc
Addressing TODOs for Instance struct (#533) Part II
georgemitenkov Mar 6, 2021
c08eb22
Unit test for scalar state kernel generation in LLVM (#547)
georgemitenkov Mar 9, 2021
ec91271
Indexed name codegen improvements (#550)
georgemitenkov Mar 12, 2021
559d152
Add InstanceStruct test data generation helper and unit test (#546)
iomaganaris Mar 13, 2021
b5d152f
Add the remainder loop for vectorization of DERIVATIVE block (#534)
alkino Mar 17, 2021
c7e5e28
Always initialize return variable in function block (#554)
alkino Mar 19, 2021
20dc785
Running a kernel with NMODL-LLVM JIT (#549)
georgemitenkov Apr 9, 2021
f684466
Loop epilogue fix for LLVM visitor helper (#567)
georgemitenkov Apr 9, 2021
cc92fc2
Gather support and vectorisation fixes for LLVM code generation (#568)
georgemitenkov Apr 10, 2021
3803ae1
Verification and file utilities for LLVM IR codegen (#582)
georgemitenkov Apr 13, 2021
60e68c9
Add gather execution test (#591)
georgemitenkov Apr 16, 2021
8f1fbae
Fixed loop allocations (#590)
georgemitenkov Apr 17, 2021
53cd1cc
Benchmarking LLVM code generation (#583)
georgemitenkov Apr 17, 2021
db80372
Minor benchmarking improvement (#593)
pramodk Apr 18, 2021
2a699a8
Bug fix in codegen helper: delete LOCAL statement (#595)
pramodk Apr 19, 2021
630033c
LLVM 13 compatibility and fixing void* type (#603)
georgemitenkov Apr 20, 2021
fe3d856
Allow LOCAL variable inside StatementBlock for LLVM IR generation (#599)
pramodk Apr 20, 2021
dddffed
Update CI with LLVM v13 (trunk) (#605)
pramodk Apr 22, 2021
068ba5d
Integrating vector maths library into LLVM codegen (#604)
georgemitenkov Apr 22, 2021
98a88d5
Using shared libraries in LLVM JIT (#609)
georgemitenkov Apr 22, 2021
16504c7
Avoid local std::ofstream object causing segfault (#614)
pramodk Apr 24, 2021
dd2889d
Refactoring of runners' infrastructure and dumping object files (#620)
georgemitenkov Apr 30, 2021
93732e0
Optimisation levels for benchmarking (#623)
georgemitenkov May 7, 2021
150943c
Adding function debug information (#628)
georgemitenkov May 8, 2021
1802b74
Fixed using benchmarking_info in TestRunner (#631)
georgemitenkov May 8, 2021
3359ea3
Fixes to run CI with NVHPC/PGI compiler
pramodk May 8, 2021
524b292
Fixed addition of SOLVE block to kernel's FOR loop (#636)
georgemitenkov May 11, 2021
68639a7
IR builder redesign for LLVM IR code generation pipeline (#634)
georgemitenkov May 13, 2021
454a18f
Fixed initialisation of `CodegenAtomicStatement` (#642)
georgemitenkov May 13, 2021
53727df
Fix instance struct data generation for testing/benchmarking (#641)
pramodk May 13, 2021
23100e9
Basic scatter support (#643)
georgemitenkov May 13, 2021
bd05479
Benchmarking code re-organisation and minor improvements (#647)
pramodk May 16, 2021
5d126aa
Added attributes and metadata to LLVM IR compute kernels (#648)
georgemitenkov May 17, 2021
ee8bbdb
Added loaded value to the stack (#655)
georgemitenkov May 18, 2021
5ee761b
Basic predication support for LLVM backend (#652)
georgemitenkov May 20, 2021
8bee7de
Improvements for LLVM code generation and benchmarking (#661)
georgemitenkov May 20, 2021
1461d8f
Fixed `alloca`s insertion point for LLVM backend (#663)
georgemitenkov May 20, 2021
908779e
Fast math flags for LLVM backend (#662)
georgemitenkov May 21, 2021
2ca85e5
Avoid generating LLVM IR for Functions and Procedures if inlined (#664)
iomaganaris May 21, 2021
7fdbb4f
Fixed typo in benchmarking metrics (#665)
georgemitenkov May 21, 2021
4c585f3
Remove only inlined blocks from AST based on symtab properties (#668)
iomaganaris May 21, 2021
f0a3afc
Use VarName on the RHS of assignment expression (#669)
pramodk May 25, 2021
2609f87
[LLVM] SLEEF and libsystem_m vector libraries support (#674)
georgemitenkov May 30, 2021
7300eb9
Added scalable type support
georgemitenkov May 31, 2021
77881fa
Clang format
georgemitenkov May 31, 2021
885fd55
Added scalable induction variable support
georgemitenkov May 31, 2021
86aa20d
Added scalable vector constant support
georgemitenkov May 31, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 50 additions & 31 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ project(
# =============================================================================
# CMake common project settings
# =============================================================================
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)

# =============================================================================
# Build options for NMODL
# =============================================================================
option(NMODL_ENABLE_PYTHON_BINDINGS "Enable pybind11 based python bindings" ON)
option(NMODL_ENABLE_PYTHON_BINDINGS "Enable pybind11 based python bindings" OFF)
option(NMODL_ENABLE_LEGACY_UNITS "Use original faraday, R, etc. instead of 2019 nist constants" OFF)
option(NMODL_ENABLE_LLVM "Enable LLVM based code generation" ON)
option(NMODL_ENABLE_JIT_EVENT_LISTENERS "Enable JITEventListener for Perf and Vtune" OFF)

if(NMODL_ENABLE_LEGACY_UNITS)
add_definitions(-DUSE_LEGACY_UNITS)
endif()
Expand Down Expand Up @@ -140,6 +143,15 @@ find_python_module(sympy 1.2 REQUIRED)
find_python_module(textwrap 0.9 REQUIRED)
find_python_module(yaml 3.12 REQUIRED)

# =============================================================================
# Find LLVM dependencies
# =============================================================================
if(NMODL_ENABLE_LLVM)
include(LLVMHelper)
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(-DNMODL_LLVM_BACKEND)
endif()

# =============================================================================
# Compiler specific flags for external submodules
# =============================================================================
Expand Down Expand Up @@ -173,6 +185,7 @@ set(MEMORYCHECK_COMMAND_OPTIONS
# do not enable tests if nmodl is used as submodule
if(NOT NMODL_AS_SUBPROJECT)
include(CTest)
add_subdirectory(test/benchmark)
add_subdirectory(test/unit)
endif()

Expand Down Expand Up @@ -228,34 +241,40 @@ endif()
message(STATUS "")
message(STATUS "Configured NMODL ${PROJECT_VERSION} (${GIT_REVISION})")
message(STATUS "")
string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_tolower)
if(cmake_generator_tolower MATCHES "makefile")
message(STATUS "Some things you can do now:")
message(STATUS "--------------------+--------------------------------------------------------")
message(STATUS "Command | Description")
message(STATUS "--------------------+--------------------------------------------------------")
message(STATUS "make | Build the project")
message(STATUS "make test | Run unit tests")
message(STATUS "make install | Will install NMODL to: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "--------------------+--------------------------------------------------------")
message(STATUS " Build option | Status")
message(STATUS "--------------------+--------------------------------------------------------")
message(STATUS "CXX COMPILER | ${CMAKE_CXX_COMPILER}")
message(STATUS "COMPILE FLAGS | ${COMPILER_FLAGS}")
message(STATUS "Build Type | ${CMAKE_BUILD_TYPE}")
message(STATUS "Legacy Units | ${NMODL_ENABLE_LEGACY_UNITS}")
message(STATUS "Python Bindings | ${NMODL_ENABLE_PYTHON_BINDINGS}")
message(STATUS "Flex | ${FLEX_EXECUTABLE}")
message(STATUS "Bison | ${BISON_EXECUTABLE}")
message(STATUS "Python | ${PYTHON_EXECUTABLE}")
if(NMODL_CLANG_FORMAT)
message(STATUS "Clang Format | ${ClangFormat_EXECUTABLE}")
endif()
if(NMODL_CMAKE_FORMAT)
message(STATUS "Cmake Format | ${CMakeFormat_EXECUTABLE}")
endif()
message(STATUS "--------------+--------------------------------------------------------------")
message(STATUS " See documentation : https://github.com/BlueBrain/nmodl/")
message(STATUS "--------------+--------------------------------------------------------------")

message(STATUS "Some things you can do now:")
message(STATUS "--------------------+--------------------------------------------------------")
message(STATUS "Command | Description")
message(STATUS "--------------------+--------------------------------------------------------")
message(STATUS "make | Build the project")
message(STATUS "make test | Run unit tests")
message(STATUS "make install | Will install NMODL to: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "--------------------+--------------------------------------------------------")
message(STATUS " Build option | Status")
message(STATUS "--------------------+--------------------------------------------------------")
message(STATUS "CXX COMPILER | ${CMAKE_CXX_COMPILER}")
message(STATUS "COMPILE FLAGS | ${COMPILER_FLAGS}")
message(STATUS "Build Type | ${CMAKE_BUILD_TYPE}")
message(STATUS "Legacy Units | ${NMODL_ENABLE_LEGACY_UNITS}")
message(STATUS "Python Bindings | ${NMODL_ENABLE_PYTHON_BINDINGS}")
message(STATUS "Flex | ${FLEX_EXECUTABLE}")
message(STATUS "Bison | ${BISON_EXECUTABLE}")
message(STATUS "Python | ${PYTHON_EXECUTABLE}")
message(STATUS "LLVM Codegen | ${NMODL_ENABLE_LLVM}")
if(NMODL_ENABLE_LLVM)
message(STATUS " VERSION | ${LLVM_PACKAGE_VERSION}")
message(STATUS " INCLUDE | ${LLVM_INCLUDE_DIRS}")
message(STATUS " CMAKE | ${LLVM_CMAKE_DIR}")
message(STATUS " JIT LISTENERS | ${NMODL_ENABLE_JIT_EVENT_LISTENERS}")
endif()
if(NMODL_CLANG_FORMAT)
message(STATUS "Clang Format | ${ClangFormat_EXECUTABLE}")
endif()
if(NMODL_CMAKE_FORMAT)
message(STATUS "Cmake Format | ${CMakeFormat_EXECUTABLE}")
endif()
message(STATUS "--------------+--------------------------------------------------------------")
message(STATUS " See documentation : https://github.com/BlueBrain/nmodl/")
message(STATUS "--------------+--------------------------------------------------------------")

message(STATUS "")
13 changes: 11 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Typically the versions of bison and flex provided by the system are outdated and
To get recent version of all dependencies we recommend using [homebrew](https://brew.sh/):

```sh
brew install flex bison cmake python3
brew install flex bison cmake python3 llvm
```

The necessary Python packages can then easily be added using the pip3 command.
Expand All @@ -57,7 +57,7 @@ export PATH=/opt/homebrew/opt/flex/bin:/opt/homebrew/opt/bison/bin:$PATH
On Ubuntu (>=18.04) flex/bison versions are recent enough and are installed along with the system toolchain:

```sh
apt-get install flex bison gcc python3 python3-pip
apt-get install flex bison gcc python3 python3-pip llvm-dev llvm-runtime llvm clang-format clang
```

The Python dependencies are installed using:
Expand All @@ -79,6 +79,15 @@ cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/nmodl
make -j && make install
```

If `llvm-config` is not in PATH then set LLVM_DIR as:

```sh
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/nmodl -DLLVM_DIR=/path/to/llvm/install/lib/cmake/llvm

# on OSX
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/nmodl -DLLVM_DIR=`brew --prefix llvm`/lib/cmake/llvm
```

And set PYTHONPATH as:

```sh
Expand Down
24 changes: 17 additions & 7 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ jobs:
url="https://github.com/ispc/ispc/releases/download/${ispc_version}/ispc-${ispc_version}${ispc_version_suffix}-${url_os}.tar.gz";
mkdir $(pwd)/$CMAKE_PKG/ispc
wget --output-document=- $url | tar -xvzf - -C $(pwd)/$CMAKE_PKG/ispc --strip 1;
# install llvm nightly (future v13)
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 13

env:
CMAKE_PKG: 'cmake-3.10.2-Linux-x86_64'
displayName: 'Install Dependencies'
Expand All @@ -56,7 +61,7 @@ jobs:
mkdir -p $(Build.Repository.LocalPath)/build
cd $(Build.Repository.LocalPath)/build
cmake --version
cmake .. -DPYTHON_EXECUTABLE=$(which python3.7) -DCMAKE_INSTALL_PREFIX=$HOME/nmodl -DCMAKE_BUILD_TYPE=Release
cmake .. -DPYTHON_EXECUTABLE=$(which python3.7) -DCMAKE_INSTALL_PREFIX=$HOME/nmodl -DCMAKE_BUILD_TYPE=Release -DNMODL_ENABLE_LLVM=ON -DLLVM_DIR=/usr/lib/llvm-13/share/llvm/cmake/
make -j 2
if [ $? -ne 0 ]
then
Expand Down Expand Up @@ -115,24 +120,27 @@ jobs:
env:
CMAKE_PKG: 'cmake-3.10.2-Linux-x86_64'
displayName: 'Build CoreNEURON and Run Integration Tests with ISPC compiler'
- job: 'osx1014'
- job: 'osx1015'
pool:
vmImage: 'macOS-10.14'
displayName: 'MacOS (10.14), AppleClang 10.0'
vmImage: 'macOS-10.15'
displayName: 'MacOS (10.15), AppleClang 11.0'
steps:
- checkout: self
submodules: True
- script: |
brew install flex cmake python@3
brew install bison
brew install flex bison cmake python@3 llvm
python3 -m pip install -U pip setuptools
python3 -m pip install --user 'Jinja2>=2.9.3' 'PyYAML>=3.13' pytest pytest-cov numpy 'sympy>=1.3'
displayName: 'Install Dependencies'
- script: |
cd $HOME
git clone --depth 1 https://github.com/pramodk/llvm-nightly.git
displayName: 'Setup LLVM v13'
- script: |
export PATH=/usr/local/opt/flex/bin:/usr/local/opt/bison/bin:$PATH;
mkdir -p $(Build.Repository.LocalPath)/build
cd $(Build.Repository.LocalPath)/build
cmake .. -DPYTHON_EXECUTABLE=$(which python3) -DCMAKE_INSTALL_PREFIX=$HOME/nmodl -DCMAKE_BUILD_TYPE=RelWithDebInfo -DNMODL_ENABLE_PYTHON_BINDINGS=OFF
cmake .. -DPYTHON_EXECUTABLE=$(which python3) -DCMAKE_INSTALL_PREFIX=$HOME/nmodl -DCMAKE_BUILD_TYPE=RelWithDebInfo -DNMODL_ENABLE_PYTHON_BINDINGS=OFF -DLLVM_DIR=$HOME/llvm-nightly/0621/osx/lib/cmake/llvm -DNMODL_ENABLE_LLVM=ON
make -j 2
if [ $? -ne 0 ]
then
Expand Down Expand Up @@ -171,6 +179,7 @@ jobs:
displayName: 'Build Neuron and Run Integration Tests'
- job: 'manylinux_wheels'
timeoutInMinutes: 45
condition: eq(1,2)
pool:
vmImage: 'ubuntu-18.04'
strategy:
Expand Down Expand Up @@ -220,6 +229,7 @@ jobs:
- template: ci/upload-wheels.yml
- job: 'macos_wheels'
timeoutInMinutes: 45
condition: eq(1,2)
pool:
vmImage: 'macOS-10.15'
strategy:
Expand Down
9 changes: 5 additions & 4 deletions ci/bb5-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ git show HEAD
source /gpfs/bbp.cscs.ch/apps/hpc/jenkins/config/modules.sh
module use /gpfs/bbp.cscs.ch/apps/tools/modules/tcl/linux-rhel7-x86_64/

module load archive/2020-10 cmake bison flex python-dev doxygen
module load unstable cmake bison flex python-dev doxygen
module list

function bb5_pr_setup_virtualenv() {
Expand Down Expand Up @@ -41,7 +41,8 @@ function build_with() {
-DPYTHON_EXECUTABLE=$(which python3) \
-DNMODL_FORMATTING:BOOL=ON \
-DClangFormat_EXECUTABLE=$clang_format_exe \
-DLLVM_DIR=/gpfs/bbp.cscs.ch/apps/hpc/jenkins/merge/deploy/externals/latest/linux-rhel7-x86_64/gcc-9.3.0/llvm-11.0.0-kzl4o5/lib/cmake/llvm
-DNMODL_ENABLE_JIT_EVENT_LISTENERS=ON \
-DLLVM_DIR=/gpfs/bbp.cscs.ch/apps/hpc/llvm-install/0621/lib/cmake/llvm
make -j6
popd
}
Expand Down Expand Up @@ -79,7 +80,7 @@ function bb5_pr_build_intel() {
}

function bb5_pr_build_pgi() {
build_with pgi
build_with nvhpc
}

function bb5_pr_test_gcc() {
Expand All @@ -91,7 +92,7 @@ function bb5_pr_test_intel() {
}

function bb5_pr_test_pgi() {
test_with pgi
test_with nvhpc
}

function bb5_pr_build_llvm() {
Expand Down
69 changes: 69 additions & 0 deletions cmake/LLVMHelper.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# =============================================================================
# LLVM/Clang needs to be linked with either libc++ or libstdc++
# =============================================================================

find_package(LLVM REQUIRED CONFIG)

# include LLVM libraries
set(NMODL_LLVM_COMPONENTS
analysis
codegen
core
executionengine
instcombine
ipo
mc
native
orcjit
target
transformutils
scalaropts
support)

if(NMODL_ENABLE_JIT_EVENT_LISTENERS)
list(APPEND NMODL_LLVM_COMPONENTS inteljitevents perfjitevents)
endif()

llvm_map_components_to_libnames(LLVM_LIBS_TO_LINK ${NMODL_LLVM_COMPONENTS})

set(CMAKE_REQUIRED_INCLUDES ${LLVM_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${LLVM_LIBS_TO_LINK})

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NMODL_ENABLE_LLVM)
include(CheckCXXSourceCompiles)

# simple code to test LLVM library linking
set(CODE_TO_TEST
"
#include <llvm/IR/IRBuilder.h>
using namespace llvm;
int main(int argc, char* argv[]) {
std::unique_ptr<IRBuilder<>> Builder;
}")

# first compile without any flags
check_cxx_source_compiles("${CODE_TO_TEST}" LLVM_LIB_LINK_TEST)

# if standard compilation fails
if(NOT LLVM_LIB_LINK_TEST)
# try libstdc++ first
set(CMAKE_REQUIRED_FLAGS "-stdlib=libstdc++")
check_cxx_source_compiles("${CODE_TO_TEST}" LLVM_LIBSTDCPP_TEST)
# on failure, try libc++
if(NOT LLVM_LIBSTDCPP_TEST)
set(CMAKE_REQUIRED_FLAGS "-stdlib=libc++")
check_cxx_source_compiles("${CODE_TO_TEST}" LLVM_LIBCPP_TEST)
endif()
# if either library works then add it to CXX flags
if(LLVM_LIBSTDCPP_TEST OR LLVM_LIBCPP_TEST)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_REQUIRED_FLAGS}")
message(
STATUS
"Adding ${CMAKE_REQUIRED_FLAGS} to CMAKE_CXX_FLAGS, required to link with LLVM libraries")
else()
message(
STATUS
"WARNING : -stdlib=libstdcx++ or -stdlib=libc++ didn't work to link with LLVM library")
endif()
endif()
endif()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _config_exe(exe_name):
]


cmake_args = ["-DPYTHON_EXECUTABLE=" + sys.executable]
cmake_args = ["-DPYTHON_EXECUTABLE=" + sys.executable, "-DNMODL_ENABLE_LLVM=OFF", "-DNMODL_ENABLE_PYTHON_BINDINGS=ON"]
if "bdist_wheel" in sys.argv:
cmake_args.append("-DLINK_AGAINST_PYTHON=FALSE")

Expand Down
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ target_link_libraries(
util
lexer
${NMODL_WRAPPER_LIBS})
if(NMODL_ENABLE_LLVM)
target_link_libraries(nmodl llvm_codegen llvm_benchmark benchmark_data ${LLVM_LIBS_TO_LINK})
endif()

# =============================================================================
# Add dependency with nmodl pytnon module (for consumer projects)
Expand Down
Loading