mirror of https://github.com/google/oss-fuzz.git
infra: rust coverage option is now stable (#7950)
Hoping to fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48744 as the warning goes `warning: `-Z instrument-coverage` is deprecated; use `-C instrument-coverage`
This commit is contained in:
parent
f7ec3dac87
commit
800a1a89ea
|
@ -120,7 +120,7 @@ fi
|
|||
if [ "$SANITIZER" = "coverage" ]
|
||||
then
|
||||
# link to C++ from comment in f5098035eb1a14aa966c8651d88ea3d64323823d
|
||||
export RUSTFLAGS="$RUSTFLAGS -Zinstrument-coverage -C link-arg=-lc++"
|
||||
export RUSTFLAGS="$RUSTFLAGS -Cinstrument-coverage -C link-arg=-lc++"
|
||||
fi
|
||||
|
||||
# Add Rust libfuzzer flags.
|
||||
|
|
|
@ -65,4 +65,3 @@ RUN git clone --depth 1 https://github.com/project-oak/oak oak
|
|||
|
||||
WORKDIR oak
|
||||
COPY build.sh $SRC/
|
||||
COPY rustc.py $SRC/
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
if [ "$SANITIZER" = "coverage" ]
|
||||
then
|
||||
export RUSTFLAGS="$RUSTFLAGS -C debug-assertions=no"
|
||||
chmod +x $SRC/rustc.py
|
||||
export RUSTC="$SRC/rustc.py"
|
||||
export CFLAGS=""
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Copyright 2021 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.
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
#Disable coverage for troubling crates.
|
||||
sys.argv[0] = "rustc"
|
||||
if "tokio_util" in sys.argv or "hyper" in sys.argv:
|
||||
try:
|
||||
sys.argv.remove("-Zinstrument-coverage")
|
||||
except:
|
||||
pass
|
||||
print(sys.argv)
|
||||
subprocess.call(sys.argv)
|
|
@ -29,4 +29,3 @@ RUN git clone https://github.com/ctz/rustls
|
|||
WORKDIR $SRC
|
||||
|
||||
COPY build.sh $SRC/
|
||||
COPY *.py $SRC/
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
if [ "$SANITIZER" = "coverage" ]
|
||||
then
|
||||
export RUSTFLAGS="$RUSTFLAGS -C debug-assertions=no"
|
||||
chmod +x $SRC/rustc.py
|
||||
export RUSTC="$SRC/rustc.py"
|
||||
export CFLAGS=""
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Copyright 2021 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.
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
#Disable coverage for troubling crates.
|
||||
sys.argv[0] = "rustc"
|
||||
if "tokio_util" in sys.argv or "hyper" in sys.argv:
|
||||
try:
|
||||
sys.argv.remove("-Zinstrument-coverage")
|
||||
except:
|
||||
pass
|
||||
print(sys.argv)
|
||||
subprocess.call(sys.argv)
|
Loading…
Reference in New Issue