Do not link non-executables with -pie for tsan=1

(-pie is incompatible with -shared and -static)

Review URL: https://chromiumcodereview.appspot.com/10690103

git-svn-id: http://src.chromium.org/svn/trunk/src/build@148393 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
glider@chromium.org 2012-07-25 20:06:45 +00:00
Родитель 5358cd8c63
Коммит 8633ac33fc
1 изменённых файлов: 28 добавлений и 22 удалений

Просмотреть файл

@ -2324,35 +2324,41 @@
['asan==1', {
'target_conditions': [
['_toolset=="target"', {
'cflags': [
'-faddress-sanitizer',
'-fno-omit-frame-pointer',
],
'ldflags': [
'-faddress-sanitizer',
],
'defines': [
'ADDRESS_SANITIZER',
],
'cflags': [
'-faddress-sanitizer',
'-fno-omit-frame-pointer',
],
'ldflags': [
'-faddress-sanitizer',
],
'defines': [
'ADDRESS_SANITIZER',
],
}],
],
}],
['tsan==1', {
'target_conditions': [
['_toolset=="target"', {
'cflags': [
'-fthread-sanitizer',
'-fno-omit-frame-pointer',
'-fPIE',
],
'ldflags': [
'-fthread-sanitizer',
'cflags': [
'-fthread-sanitizer',
'-fno-omit-frame-pointer',
'-fPIE',
],
'ldflags': [
'-fthread-sanitizer',
],
'defines': [
'THREAD_SANITIZER',
'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
],
'target_conditions': [
['_type=="executable"', {
'ldflags': [
'-pie',
],
'defines': [
'THREAD_SANITIZER',
'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
],
],
}],
],
}],
],
}],