diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 60bc17f1b4f..65ef0043af1 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -12,9 +12,14 @@ env: jobs: lint: name: Code lint - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3 + - name: Set up libstdc++ on Linux + run: | + sudo apt-get update -y + sudo apt-get install -y --allow-downgrades libstdc++6=8.4.0-1ubuntu1~18.04 + sudo apt-get install --reinstall g++-8 - name: Install Rust uses: dtolnay/rust-toolchain@stable with: diff --git a/Makefile b/Makefile index 1b60028e05d..68821bb4283 100644 --- a/Makefile +++ b/Makefile @@ -130,6 +130,8 @@ else ifeq ($(ENABLE_LLVM), 1) else ifneq (, $(shell which llvm-config-13 2>/dev/null)) LLVM_VERSION := $(shell llvm-config-13 --version) compilers += llvm + # need force LLVM_SYS_120_PREFIX, or llvm_sys will not build in the case + export LLVM_SYS_120_PREFIX = $(shell llvm-config-13 --prefix) else ifneq (, $(shell which llvm-config-12 2>/dev/null)) LLVM_VERSION := $(shell llvm-config-12 --version) compilers += llvm diff --git a/lib/api/src/sys/store.rs b/lib/api/src/sys/store.rs index 65901c2dc82..612652014a2 100644 --- a/lib/api/src/sys/store.rs +++ b/lib/api/src/sys/store.rs @@ -197,24 +197,28 @@ impl AsStoreMut for Store { } } +#[cfg(feature = "compiler")] impl AsEngineRef for Store { fn as_engine_ref(&self) -> EngineRef<'_> { EngineRef::new(&self.engine) } } +#[cfg(feature = "compiler")] impl AsEngineRef for &Store { fn as_engine_ref(&self) -> EngineRef<'_> { EngineRef::new(&self.engine) } } +#[cfg(feature = "compiler")] impl AsEngineRef for StoreRef<'_> { fn as_engine_ref(&self) -> EngineRef<'_> { EngineRef::new(&self.inner.engine) } } +#[cfg(feature = "compiler")] impl AsEngineRef for StoreMut<'_> { fn as_engine_ref(&self) -> EngineRef<'_> { EngineRef::new(&self.inner.engine)