Skip to content

Commit

Permalink
feat: add optional llvm feature
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <xpf6677@163.com>
  • Loading branch information
Peefy committed Apr 8, 2024
1 parent a202f5f commit abe775e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions kclvm/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@ fix:

# Unit tests without code cov
test:
cargo test --workspace -r -- --nocapture
cargo test --workspace -r --features llvm -- --nocapture

# Unit tests with code cov (Requires rust 1.60+)
codecov:
rustup component add llvm-tools-preview
cargo install cargo-llvm-cov
cargo llvm-cov --workspace --ignore-filename-regex gpyrpc.rs --html --open -- --nocapture
cargo llvm-cov --workspace --features llvm --ignore-filename-regex gpyrpc.rs --html --open -- --nocapture

# Unit tests with code cov and output the lcov file (Requires rust 1.60+)
codecov-lcov:
rustup component add llvm-tools-preview
cargo install cargo-llvm-cov
rm -rf $(PWD)/.kclvm_cov
mkdir $(PWD)/.kclvm_cov
cargo llvm-cov --lcov --output-path $(PWD)/.kclvm_cov/lcov.info -r --workspace --ignore-filename-regex gpyrpc.rs -- --nocapture
cargo llvm-cov --features llvm --lcov --output-path $(PWD)/.kclvm_cov/lcov.info -r --workspace --ignore-filename-regex gpyrpc.rs -- --nocapture

# Test runtime libaries using python functions
test-runtime: install-kclvm-py install-pytest
Expand Down
2 changes: 1 addition & 1 deletion kclvm/runner/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{execute, runner::ExecProgramArgs};
use anyhow::Context;
use anyhow::Result;
use kclvm_ast::ast::{Module, Program};
use kclvm_compiler::codegen::llvm::OBJECT_FILE_SUFFIX;
use kclvm_compiler::codegen::OBJECT_FILE_SUFFIX;
use kclvm_config::settings::load_file;
use kclvm_parser::load_program;
use kclvm_parser::ParseSession;
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-windows/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Set-Location $PSScriptRoot
# 1. Install kclvm_cli_cdylib.dll
Set-Location "..\..\kclvm"
cargo build --release
cargo build --release --features llvm
Set-Location $PSScriptRoot

New-Item -ErrorAction Ignore -Path ".\_output" -ItemType "directory"
Expand Down

0 comments on commit abe775e

Please sign in to comment.