summaryrefslogtreecommitdiff
path: root/mjit_worker.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-12 14:42:25 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-12 14:42:25 (GMT)
commitbd789fa5909a64eede6dbf33798a41849e96722c (patch)
tree5e6a7258157be77de4760aae26004078311f508c /mjit_worker.c
parentc55e10a9eaee956ac6fbc12d6962658a510a79ff (diff)
mjit_worker.c: allow showing line number
on addr2line.c, if --jit-save-temps is specified. I'm going to use the line number to lazily create program counter to improve the performance degraded in r64283. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit_worker.c')
-rw-r--r--mjit_worker.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index 5e73ba8..fb46df7 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -254,11 +254,20 @@ static const char *const CC_COMMON_ARGS[] = {
#define CC_PATH CC_COMMON_ARGS[0]
static const char *const CC_DEBUG_ARGS[] = {MJIT_DEBUGFLAGS NULL};
-static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS NULL};
+static const char *const CC_OPTIMIZE_ARGS[] = {
+ MJIT_OPTFLAGS
+#ifdef USE_ELF /* at least -g1 is required to get line number on addr2line.c, and -g (-g2) is slow. */
+ "-g1",
+#endif
+ NULL
+};
static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED GCC_PIC_FLAGS NULL};
static const char *const CC_DLDFLAGS_ARGS[] = {
MJIT_DLDFLAGS
+#ifdef USE_ELF /* force disable compression to get line number on addr2line.c */
+ "-Wl,--compress-debug-sections=none",
+#endif
#if defined __GNUC__ && !defined __clang__
"-nostartfiles",
# if !defined(_WIN32) && !defined(__CYGWIN__)