forked from kcl-lang/kcl
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: peefy <[email protected]>
- Loading branch information
Showing
5 changed files
with
43 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build and Test on centos7 amd64 | ||
|
||
on: ["push", "pull_request"] | ||
|
||
jobs: | ||
build-and-test-arm64: | ||
name: Build and Test on Linux ARM64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "true" | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: linux/amd64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Pull custom ARM64 Docker image | ||
run: | | ||
docker pull kcllang/kcl-builder:centos7 | ||
- name: Run custom ARM64 Docker image | ||
run: | | ||
docker run --rm --platform linux/arm64 \ | ||
-v ${{ github.workspace }}:/workspace -w /workspace \ | ||
kcllang/kcl-builder:centos7 \ | ||
source ~/bash_profile && export PATH=$PATH:/opt/build/bin && sed -i '' 's/llvm12/llvm7/g' kclvm/compiler/Cargo.toml && make && make release | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: kcl-centos7-amd64 | ||
path: _build/dist/centos/kclvm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,10 @@ | ||
// Copyright The KCL Authors. All rights reserved. | ||
|
||
use super::context::{DebugModule, LLVMCodeGenContext}; | ||
use crate::codegen::traits::ProgramCodeGen; | ||
use inkwell::module::Module; | ||
|
||
impl<'ctx> LLVMCodeGenContext<'ctx> { | ||
pub(crate) fn create_debug_module(&self, module: Module<'ctx>) -> DebugModule<'ctx> { | ||
let (dibuilder, compile_unit) = module.create_debug_info_builder( | ||
true, | ||
/* language */ inkwell::debug_info::DWARFSourceLanguage::C, | ||
/* filename */ &self.current_pkgpath(), | ||
/* directory */ ".", | ||
/* producer */ "kcl", | ||
/* is_optimized */ false, | ||
/* compiler command line flags */ "", | ||
/* runtime_ver */ 0, | ||
/* split_name */ "", | ||
/* kind */ inkwell::debug_info::DWARFEmissionKind::Full, | ||
/* dwo_id */ 0, | ||
/* split_debug_inling */ false, | ||
/* debug_info_for_profiling */ false, | ||
/* sys_root */ ".", | ||
"", | ||
); | ||
let debug_metadata_version = self.context.i32_type().const_int(3, false); | ||
module.add_basic_value_flag( | ||
"Debug Info Version", | ||
inkwell::module::FlagBehavior::Warning, | ||
debug_metadata_version, | ||
); | ||
DebugModule { | ||
inner: module, | ||
dibuilder, | ||
compile_unit, | ||
} | ||
DebugModule { inner: module } | ||
} | ||
} |