Skip to content

Commit

Permalink
Update to use LLVM 13.0.0 binaries and pump version to 21.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuichis committed Oct 9, 2021
1 parent c158856 commit 5817d76
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- run: sudo xcode-select -s /Applications/Xcode_12.5.app/Contents/Developer
- run: sudo xcode-select -s /Applications/Xcode_13.0.app/Contents/Developer
if: matrix.os == 'macos-11'
- run: cd oclint-scripts && ./gh-actions build
- name: Configure AWS credentials
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- run: sudo xcode-select -s /Applications/Xcode_12.5.app/Contents/Developer
- run: sudo xcode-select -s /Applications/Xcode_13.0.app/Contents/Developer
if: matrix.os == 'macos-11'
- run: cd oclint-scripts && ./gh-actions docgen
- name: Configure AWS credentials
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
sudo apt-get install -y ninja-build
if: matrix.os == 'ubuntu-20.04'
- run: |
sudo xcode-select -s /Applications/Xcode_12.5.app/Contents/Developer
sudo xcode-select -s /Applications/Xcode_13.0.app/Contents/Developer
brew install ninja
if: matrix.os == 'macos-11'
- run: cd oclint-scripts && ./make && ./bundle -archive -release
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/system-llvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ jobs:
- run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 12
sudo apt-get -y install libllvm12 llvm-12 llvm-12-dev llvm-12-runtime clang-12 clang-tools-12 libclang-common-12-dev libclang-12-dev libclang1-12
sudo ./llvm.sh 13
sudo apt-get -y install libllvm13 llvm-13 llvm-13-dev llvm-13-runtime clang-13 clang-tools-13 libclang-common-13-dev libclang-13-dev libclang1-13
- run: |
cd oclint-scripts
./build -no-ninja -llvm-root=/usr/lib/llvm-12
./bundle -archive -llvm-root=/usr/lib/llvm-12
./build -no-ninja -llvm-root=/usr/lib/llvm-13
./bundle -archive -llvm-root=/usr/lib/llvm-13
build-on-mac:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- run: |
sudo xcode-select -s /Applications/Xcode_12.5.app/Contents/Developer
HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm@12
sudo xcode-select -s /Applications/Xcode_13.0.app/Contents/Developer
HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm@13
- run: |
cd oclint-scripts
./build -no-ninja -llvm-root=/usr/local/opt/llvm\@12
./bundle -archive -llvm-root=/usr/local/opt/llvm\@12
./build -no-ninja -llvm-root=/usr/local/opt/llvm\@13
./bundle -archive -llvm-root=/usr/local/opt/llvm\@13
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- run: sudo xcode-select -s /Applications/Xcode_12.5.app/Contents/Developer
- run: sudo xcode-select -s /Applications/Xcode_13.0.app/Contents/Developer
- env:
MODULE: ${{ matrix.module }}
DEPS: ${{ matrix.deps }}
Expand Down
2 changes: 1 addition & 1 deletion oclint-core/cmake/OCLintConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ENDIF()

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

SET(OCLINT_VERSION_RELEASE "21.05")
SET(OCLINT_VERSION_RELEASE "21.10")

IF(LLVM_ROOT)
IF(NOT EXISTS ${LLVM_ROOT}/include/llvm)
Expand Down
2 changes: 1 addition & 1 deletion oclint-core/lib/Constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace oclint;

std::string Constants::version()
{
return "21.05";
return "21.10";
}

std::string Constants::homepage()
Expand Down
2 changes: 1 addition & 1 deletion oclint-core/test/VersionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using namespace oclint;

TEST(VersionTest, VersionString)
{
EXPECT_THAT(Constants::version(), StrEq("21.05"));
EXPECT_THAT(Constants::version(), StrEq("21.10"));
}

TEST(VersionTest, HomepageString)
Expand Down
3 changes: 2 additions & 1 deletion oclint-driver/include/oclint/ExitCode.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ enum ExitCode
ERROR_WHILE_PROCESSING,
ERROR_WHILE_REPORTING,
VIOLATIONS_EXCEED_THRESHOLD,
COMPILATION_ERRORS
COMPILATION_ERRORS,
COMMON_OPTIONS_PARSER_ERRORS
};

#endif
2 changes: 1 addition & 1 deletion oclint-driver/lib/CompilerInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void CompilerInstance::setupTarget() {
setAuxTarget(clang::TargetInfo::CreateTargetInfo(getDiagnostics(), targetOptions));
}

getTarget().adjust(getLangOpts());
getTarget().adjust(getDiagnostics(), getLangOpts());

if (auto *auxTarget = getAuxTarget()) {
getTarget().setAuxTarget(auxTarget);
Expand Down
2 changes: 1 addition & 1 deletion oclint-driver/lib/ConfigFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static llvm::Optional<bool> createOptionalBool(const TriState value)
return llvm::Optional<bool>(false);
case TRUE:
return llvm::Optional<bool>(true);
case UNDEFINED:
default:
return llvm::Optional<bool>();
}
}
Expand Down
8 changes: 7 additions & 1 deletion oclint-driver/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,13 @@ int handleExit(oclint::Results *results)
int main(int argc, const char **argv)
{
llvm::cl::SetVersionPrinter(oclintVersionPrinter);
CommonOptionsParser optionsParser(argc, argv, OCLintOptionCategory);
auto expectedParser = CommonOptionsParser::create(argc, argv, OCLintOptionCategory);
if (!expectedParser)
{
llvm::errs() << expectedParser.takeError();
return COMMON_OPTIONS_PARSER_ERRORS;
}
CommonOptionsParser &optionsParser = expectedParser.get();
oclint::option::process(argv[0]);

int prepareStatus = prepare();
Expand Down
6 changes: 3 additions & 3 deletions oclint-scripts/oclintscripts/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ class url:
json_compilation_database = 'https://github.com/oclint/oclint-json-compilation-database.git'
xcodebuild = 'https://github.com/oclint/oclint-xcodebuild.git'

clang_prebuilt_binary_for_macos = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/clang+llvm-12.0.0-x86_64-apple-darwin.tar.xz'
clang_prebuilt_binary_for_ubuntu_lts_20 = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/clang+llvm-12.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz'
clang_prebuilt_binary_for_aarch64 = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/clang+llvm-12.0.0-aarch64-linux-gnu.tar.xz'
clang_prebuilt_binary_for_macos = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz'
clang_prebuilt_binary_for_ubuntu_lts_20 = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz'
clang_prebuilt_binary_for_aarch64 = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0-rc4/clang+llvm-13.0.0-rc4-aarch64-linux-gnu.tar.xz'

def cd(dir_path):
os.chdir(dir_path)
Expand Down
4 changes: 2 additions & 2 deletions oclint-scripts/oclintscripts/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ def dev_version():
return "src"

def oclint_version():
return "21.05"
return "21.10"

def oclint_dev_version():
return oclint_version() + '.dev.' + dev_version()

def llvm_version():
return "12.0.0"
return "13.0.0"

0 comments on commit 5817d76

Please sign in to comment.