-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable CI for clang with FIPS mode. (#199)
* enable CI for clang with FIPS mode Signed-off-by: Shikugawa <[email protected]> * fix Signed-off-by: Shikugawa <[email protected]> * fix Signed-off-by: Shikugawa <[email protected]> * fix Signed-off-by: Shikugawa <[email protected]> * fix Signed-off-by: Shikugawa <[email protected]> * fix Signed-off-by: Shikugawa <[email protected]> * fix Signed-off-by: Shikugawa <[email protected]> * fix Signed-off-by: Shikugawa <[email protected]> * fix Signed-off-by: Shikugawa <[email protected]> * fix Signed-off-by: Shikugawa <[email protected]>
- Loading branch information
Showing
20 changed files
with
122 additions
and
79 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
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,9 +1,23 @@ | ||
# Wrappers around native build recipes to enforce consistent use of flags and build variables. | ||
|
||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test") | ||
|
||
_DEFAULT_COPTS = ["-Wall", "-Wextra"] | ||
|
||
def xx_library(name, deps = [], srcs = [], hdrs = [], copts = [], defines = [], includes = [], textual_hdrs = []): | ||
native.cc_library(name = name, deps = deps, srcs = srcs, hdrs = hdrs, copts = _DEFAULT_COPTS + copts, defines = defines, includes = includes, textual_hdrs = textual_hdrs) | ||
def authsvc_cc_library(name, deps = [], srcs = [], hdrs = [], copts = [], defines = [], includes = [], textual_hdrs = [], visibility = None): | ||
cc_library(name = name, deps = deps, srcs = srcs, hdrs = hdrs, copts = _DEFAULT_COPTS + copts, defines = defines, includes = includes, textual_hdrs = textual_hdrs, visibility = visibility) | ||
|
||
def authsvc_cc_binary(name, deps = [], srcs = [], copts = [], defines = []): | ||
cc_binary(name = name, deps = deps, srcs = srcs, copts = _DEFAULT_COPTS + copts, defines = defines) | ||
|
||
def xx_binary(name, deps = [], srcs = [], copts = [], defines = []): | ||
native.cc_binary(name = name, deps = deps, srcs = srcs, copts = _DEFAULT_COPTS + copts, defines = defines) | ||
def authsvc_cc_test(name, deps = [], srcs = [], data = []): | ||
cc_test( | ||
name = name, | ||
deps = deps, | ||
srcs = srcs, | ||
data = data, | ||
# We choose to use static link because boringssl FIPS build seem not be able | ||
# to resolved for unit test, | ||
# https://gist.github.com/Shikugawa/0ff7ef056cf6fdb2605ad81fcb0be814 (optional) | ||
linkstatic = True, | ||
) |
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,13 @@ | ||
#!/bin/bash | ||
|
||
LLVM_VERSION=12.0.0 | ||
LLVM_TAR=clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-20.04.tar.xz | ||
TARGET_DST=/opt/llvm | ||
|
||
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/${LLVM_TAR} | ||
|
||
if [[ ! -e "${TARGET_DST}" ]]; then | ||
mkdir -p ${TARGET_DST} | ||
fi | ||
|
||
tar -xvf ${LLVM_TAR} -C ${TARGET_DST} --strip-components 1 |
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
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
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
Oops, something went wrong.