diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-06 05:14:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-06 05:14:36 +0000 |
commit | b11b804f8f4c84c7f5d59dd215e3d8a3d4d9d889 (patch) | |
tree | f94cc4f18c2dc8b5feb34352ae305248979bdd21 /mjit.c | |
parent | a5400ebbd5d8cff97ef20d3798d2dbb4b2302009 (diff) |
Revert "mjit_build_dir: separate MJIT_BUILD_DIR"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -381,7 +381,7 @@ init_header_filename(void) const size_t libpathflag_len = sizeof(libpathflag) - 1; #endif #ifndef LOAD_RELATIVE - const char *build_dir = 0; + static const char build_dir[] = MJIT_BUILD_DIR; struct stat st; #endif @@ -394,12 +394,7 @@ init_header_filename(void) /* This path is not intended to be used on production, but using build directory's header file here because people want to run `make test-all` without running `make install`. Don't use $MJIT_SEARCH_BUILD_DIR except for test-all. */ - - build_dir = dlsym(RTLD_DEFAULT, "MJIT_BUILD_DIR"); - if (!build_dir) { - verbose(1, "No mjit_build_directory"); - } - else if (build_dir[0] != '/') { + if (build_dir[0] != '/') { verbose(1, "Non-absolute path MJIT_BUILD_DIR: %s", build_dir); } else if (stat(build_dir, &st) || !S_ISDIR(st.st_mode)) { @@ -410,9 +405,8 @@ init_header_filename(void) return FALSE; } else { - verbose(3, "MJIT_BUILD_DIR: %s", build_dir); basedir = build_dir; - baselen = strlen(build_dir); + baselen = sizeof(build_dir) - 1; } } #endif |