summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralextaran@chromium.org <alextaran@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 18:39:52 +0000
committeralextaran@chromium.org <alextaran@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 18:39:52 +0000
commitdffea4c0355c7237d72c61d8dff28199734573fb (patch)
treea6838498f5d1af93e640e7aad92bc0885af2be20
parent6ce6c27370f5a895045ab77d5d30d9472e2dee67 (diff)
downloadchromium_src-dffea4c0355c7237d72c61d8dff28199734573fb.zip
chromium_src-dffea4c0355c7237d72c61d8dff28199734573fb.tar.gz
chromium_src-dffea4c0355c7237d72c61d8dff28199734573fb.tar.bz2
Add custom linker flags for instrumented libraries build.
BUG=313751 TBR=cpu@chromium.org R=glider@chromium.org Review URL: https://codereview.chromium.org/118213002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241605 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xthird_party/instrumented_libraries/download_build_install.py6
-rw-r--r--third_party/instrumented_libraries/instrumented_libraries.gyp1
-rw-r--r--third_party/instrumented_libraries/standard_instrumented_library_target.gypi1
3 files changed, 6 insertions, 2 deletions
diff --git a/third_party/instrumented_libraries/download_build_install.py b/third_party/instrumented_libraries/download_build_install.py
index f799370..d883f8e 100755
--- a/third_party/instrumented_libraries/download_build_install.py
+++ b/third_party/instrumented_libraries/download_build_install.py
@@ -105,7 +105,8 @@ def download_build_install(parsed_arguments):
# differently escaped. Instead of having problems with that it just
# uses XORIGIN to build library and after that replaces it to $ORIGIN
# directly in .so file.
- environment['LDFLAGS'] = sanitizer_params['linker_flags']
+ environment['LDFLAGS'] = '%s %s' % (sanitizer_params['linker_flags'],
+ parsed_arguments.custom_linker_flags)
library_directory = '%s/%s' % (parsed_arguments.intermediate_directory,
parsed_arguments.library)
@@ -160,7 +161,8 @@ def main():
help='Relative path to the directory with chrome binaries')
argument_parser.add_argument('-m', '--intermediate-directory', default='.',
help='Relative path to the directory for temporary build files')
- argument_parser.add_argument('-c', '--custom-configure-flags', default='')
+ argument_parser.add_argument('--custom-configure-flags', default='')
+ argument_parser.add_argument('--custom-linker-flags', default='')
argument_parser.add_argument('-s', '--sanitizer-type', required=True,
choices=SUPPORTED_SANITIZERS.keys())
argument_parser.add_argument('-v', '--verbose', action='store_true')
diff --git a/third_party/instrumented_libraries/instrumented_libraries.gyp b/third_party/instrumented_libraries/instrumented_libraries.gyp
index f847bf9..e321179 100644
--- a/third_party/instrumented_libraries/instrumented_libraries.gyp
+++ b/third_party/instrumented_libraries/instrumented_libraries.gyp
@@ -5,6 +5,7 @@
{
# Default value for all libraries.
'custom_configure_flags': '',
+ 'custom_linker_flags': '',
'variables': {
'verbose_libraries_build%': 0,
diff --git a/third_party/instrumented_libraries/standard_instrumented_library_target.gypi b/third_party/instrumented_libraries/standard_instrumented_library_target.gypi
index 42e0f1a..9985082 100644
--- a/third_party/instrumented_libraries/standard_instrumented_library_target.gypi
+++ b/third_party/instrumented_libraries/standard_instrumented_library_target.gypi
@@ -23,6 +23,7 @@
'--intermediate-directory=<(INTERMEDIATE_DIR)',
'--sanitizer-type=<(_sanitizer_type)',
'--custom-configure-flags=<(_custom_configure_flags)',
+ '--custom-linker-flags=<(_custom_linker_flags)',
'<(_verbose_libraries_build_flag)',
'--c-compiler=<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang',
'--cxx-compiler=<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang++',