tidy(solc) (#2336)

* tidy(solc)

* -fPIC

* cmake-style

* llvm<16?

* llvm<15?
This commit is contained in:
Jacob Heider 2023-07-01 01:12:28 -04:00 committed by GitHub
parent 79bb350d63
commit 4945c1085c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 18 deletions

View file

@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
pragma solidity >=0.5.0;
contract HelloWorld {
function helloWorld() external pure returns (string memory) {
return "Hello, World!";

View file

@ -20,27 +20,26 @@ build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
linux/aarch64:
# Prevents ld.lld: error: relocation R_AARCH64_ABS64 cannot be used against local symbol; recompile with -fPIC
llvm.org: '<15'
cmake.org: 3
freedesktop.org/pkg-config: ^0.29
git-scm.org: 2
crates.io/semverator: '*'
gnu.org/patch: '*'
working-directory: build
script: |
if semverator eq 0.8.18 {{version}}; then
# New libsolidity/lsb/DocumentHoverHandler.cpp doesn't like some versions of clang
# (default argument issue)
# https://github.com/ethereum/solidity/issues/13854
patch -p1 -d.. <../props/clang-error.diff
fi
script:
# New libsolidity/lsb/DocumentHoverHandler.cpp doesn't like some versions of clang
# (default argument issue)
# https://github.com/ethereum/solidity/issues/13854
- run: patch -p1 -d.. <../props/clang-error.diff
if: =0.8.18
cmake .. $ARGS
make --jobs {{hw.concurrency}}
make install
- cmake .. $ARGS
- make --jobs {{hw.concurrency}}
- make install
if semverator lt {{version}} 0.8.18; then
rm {{prefix}}/bin/solidity-upgrade
fi
- run: rm {{prefix}}/bin/solidity-upgrade
if: <0.8.18
test:
make test
env:
@ -50,5 +49,4 @@ build:
- -DPEDANTIC=OFF # otherwise fails due to deprecations in boost ^1.81
- -DSTRICT_Z3_VERSION=OFF # otherwise complains about Z3 version in cmake
test:
solc --bin fixture.sol
test: solc --bin fixture.sol