Commit 4014f1c7 authored by jfb's avatar jfb Committed by Commit bot

Revert of [coverage] Filter some files from instrumentation. (patchset #3...

Revert of [coverage] Filter some files from instrumentation. (patchset #3 id:40001 of https://codereview.chromium.org/1730543002/ )

Reason for revert:
This breaks `gclient sync` because v8_target_arch isn't defined.

gyp: name 'v8_target_arch' is not defined while evaluating condition
'(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and
         (v8_target_arch!="x87" and v8_target_arch!="x32") and coverage==0' in
/media/jfb/ssd/v8/v8/build/all.gyp
Error: Command '/usr/bin/python v8/build/gyp_v8' returned non-zero exit status 1
in /media/jfb/ssd/v8

Original issue's description:
> [coverage] Filter some files from instrumentation.
>
> This filters test and third_party files to get a speed-up
> when running tests and when collecting profile data.
>
> BUG=chromium:568949
> LOG=n
>
> Committed: https://crrev.com/761ee31be5ab4fde05c294e5d632608fbaea8ad4
> Cr-Commit-Position: refs/heads/master@{#34216}
>
> Committed: https://crrev.com/906db7448702a6ac9fab2a445c57cc85f6dd1b1a
> Cr-Commit-Position: refs/heads/master@{#34253}

TBR=tandrii@chromium.org,kjellander@chromium.org,machenbach@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:568949

Review URL: https://codereview.chromium.org/1737433002

Cr-Commit-Position: refs/heads/master@{#34258}
parent 9015dd1c
#!/usr/bin/env python
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# CC/CXX wrapper script that excludes certain file patterns from coverage
# instrumentation.
import re
import subprocess
import sys
exclusions = [
'src/third_party',
'third_party',
'test',
'testing',
]
args = sys.argv[1:]
text = ' '.join(sys.argv[2:])
for exclusion in exclusions:
if re.search(r'\-o obj/%s[^ ]*\.o' % exclusion, text):
args.remove('-fprofile-arcs')
args.remove('-ftest-coverage')
break
sys.exit(subprocess.check_call(args))
......@@ -48,12 +48,6 @@
'release_extra_cflags%': '',
'variables': {
'variables': {
# goma settings.
# 1 to use goma.
# If no gomadir is set, it uses the default gomadir.
'use_goma%': 0,
'gomadir%': '',
'variables': {
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or \
......@@ -76,23 +70,12 @@
# Instrument for code coverage with gcov.
'coverage%': 0,
'conditions': [
# Set default gomadir.
['OS=="win"', {
'gomadir': 'c:\\goma\\goma-win',
}, {
'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
}],
],
},
'base_dir%': '<(base_dir)',
'host_arch%': '<(host_arch)',
'target_arch%': '<(target_arch)',
'v8_target_arch%': '<(target_arch)',
'coverage%': '<(coverage)',
'use_goma%': '<(use_goma)',
'gomadir%': '<(gomadir)',
'asan%': 0,
'lsan%': 0,
'msan%': 0,
......@@ -121,10 +104,22 @@
# TODO(machenbach): Only configured for windows.
'fastbuild%': 0,
# goma settings.
# 1 to use goma.
# If no gomadir is set, it uses the default gomadir.
'use_goma%': 0,
'gomadir%': '',
# Check if valgrind directories are present.
'has_valgrind%': '<!pymod_do_main(has_valgrind)',
'conditions': [
# Set default gomadir.
['OS=="win"', {
'gomadir': 'c:\\goma\\goma-win',
}, {
'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
}],
['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le" and host_arch!="s390" and host_arch!="s390x" and \
coverage==0', {
'host_clang%': 1,
......@@ -149,13 +144,6 @@
}, {
'test_isolation_mode%': 'noop',
}],
['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and \
(v8_target_arch!="x87" and v8_target_arch!="x32") and coverage==0', {
'clang%': 1,
}, {
'clang%': 0,
}],
],
},
'base_dir%': '<(base_dir)',
......@@ -167,7 +155,6 @@
'werror%': '-Werror',
'use_goma%': '<(use_goma)',
'gomadir%': '<(gomadir)',
'clang%': '<(clang)',
'asan%': '<(asan)',
'lsan%': '<(lsan)',
'msan%': '<(msan)',
......@@ -246,6 +233,12 @@
}, {
'v8_enable_gdbjit%': 0,
}],
['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and \
(v8_target_arch!="x87" and v8_target_arch!="x32") and coverage==0', {
'clang%': 1,
}, {
'clang%': 0,
}],
['asan==1 or lsan==1 or msan==1 or tsan==1', {
'clang%': 1,
'use_allocator%': 'none',
......@@ -369,23 +362,6 @@
'host_cc': '<!(which gcc)',
'host_cxx': '<!(which g++)',
}],
['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', {
'conditions': [
['coverage==1', {
'cc_wrapper': '<(base_dir)/build/coverage_wrapper.py <(gomadir)/gomacc',
}, {
'cc_wrapper': '<(gomadir)/gomacc',
}],
],
}, {
'conditions': [
['coverage==1', {
'cc_wrapper': '<(base_dir)/build/coverage_wrapper.py',
}, {
'cc_wrapper': 0,
}],
],
}],
],
# Default ARM variable settings.
'arm_version%': 'default',
......@@ -1285,12 +1261,12 @@
# TODO(yyanagisawa): supports GENERATOR==make
# make generator doesn't support CC_wrapper without CC
# in make_global_settings yet.
['cc_wrapper!=0', {
['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', {
'make_global_settings': [
['CC_wrapper', '<(cc_wrapper)'],
['CXX_wrapper', '<(cc_wrapper)'],
['CC.host_wrapper', '<(cc_wrapper)'],
['CXX.host_wrapper', '<(cc_wrapper)'],
['CC_wrapper', '<(gomadir)/gomacc'],
['CXX_wrapper', '<(gomadir)/gomacc'],
['CC.host_wrapper', '<(gomadir)/gomacc'],
['CXX.host_wrapper', '<(gomadir)/gomacc'],
],
}],
['use_lto==1', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment