mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-25 01:01:04 +00:00
Add Linux ASAN bot configs. (#2427)
Fix the ASAN part of the bot script. Add continuous and presubmit Linux ASAN bot configurations.
This commit is contained in:
parent
07f80c4df1
commit
a2ef7be242
24
kokoro/linux-clang-asan/build.sh
Normal file
24
kokoro/linux-clang-asan/build.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2019 Google LLC.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# Linux Build Script.
|
||||
|
||||
# Fail on any error.
|
||||
set -e
|
||||
# Display commands being run.
|
||||
set -x
|
||||
|
||||
SCRIPT_DIR=`dirname "$BASH_SOURCE"`
|
||||
source $SCRIPT_DIR/../scripts/linux/build.sh ASAN clang
|
16
kokoro/linux-clang-asan/continuous.cfg
Normal file
16
kokoro/linux-clang-asan/continuous.cfg
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2019 Google LLC.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Continuous build configuration.
|
||||
build_file: "SPIRV-Tools/kokoro/linux-clang-asan/build.sh"
|
16
kokoro/linux-clang-asan/presubmit.cfg
Normal file
16
kokoro/linux-clang-asan/presubmit.cfg
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2019 Google LLC.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Presubmit build configuration.
|
||||
build_file: "SPIRV-Tools/kokoro/linux-clang-asan/build.sh"
|
@ -31,8 +31,7 @@ BUILD_TYPE="Debug"
|
||||
CMAKE_C_CXX_COMPILER=""
|
||||
if [ $COMPILER = "clang" ]
|
||||
then
|
||||
sudo ln -s /usr/bin/clang-3.8 /usr/bin/clang
|
||||
sudo ln -s /usr/bin/clang++-3.8 /usr/bin/clang++
|
||||
PATH=/usr/lib/llvm-3.8/bin:$PATH
|
||||
CMAKE_C_CXX_COMPILER="-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
|
||||
fi
|
||||
|
||||
@ -48,7 +47,7 @@ ADDITIONAL_CMAKE_FLAGS=""
|
||||
if [ $CONFIG = "ASAN" ]
|
||||
then
|
||||
ADDITIONAL_CMAKE_FLAGS="-DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_C_FLAGS=-fsanitize=address"
|
||||
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.4
|
||||
[ $COMPILER = "clang" ] || { echo "$CONFIG requires clang"; exit 1; }
|
||||
elif [ $CONFIG = "COVERAGE" ]
|
||||
then
|
||||
ADDITIONAL_CMAKE_FLAGS="-DENABLE_CODE_COVERAGE=ON"
|
||||
|
Loading…
Reference in New Issue
Block a user