Commit f8b1f59c authored by Ryan Harrison's avatar Ryan Harrison Committed by Commit Bot

Add gn arg for passing --no-rosegment to lld

This is used as a workaround to get profiling using Valgrind working.

BUG=830706

Change-Id: Ie502f78681b686ea595c06255b7be712e32c8322
Reviewed-on: https://chromium-review.googlesource.com/1002921
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549304}
parent b828d53c
...@@ -116,6 +116,11 @@ declare_args() { ...@@ -116,6 +116,11 @@ declare_args() {
# Turn this on to have the compiler output extra timing information. # Turn this on to have the compiler output extra timing information.
compiler_timing = false compiler_timing = false
# Set to true to pass --no-rosegment to lld. This is a workaround
# for a KI issue in Valgrind,
# https://bugs.kde.org/show_bug.cgi?id=384727
ro_segment_workaround_for_valgrind = false
} }
declare_args() { declare_args() {
...@@ -636,6 +641,12 @@ config("compiler") { ...@@ -636,6 +641,12 @@ config("compiler") {
} }
} }
# Pass flag to LLD to work around issue in Valgrind related to
# location of debug symbols.
if (use_lld && ro_segment_workaround_for_valgrind) {
ldflags += [ "-Wl,--no-rosegment" ]
}
# Pass the same C/C++ flags to the objective C/C++ compiler. # Pass the same C/C++ flags to the objective C/C++ compiler.
cflags_objc += cflags_c cflags_objc += cflags_c
cflags_objcc += cflags_cc cflags_objcc += cflags_cc
......
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