mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8136556: Add the ability to perform static builds of MacOSX x64 binaries
Reviewed-by: ihse, bdelsart, gadams, lfoltan, rriggs, hseigel, twisti
This commit is contained in:
parent
119988f54a
commit
d65d34b99d
11 changed files with 128 additions and 38 deletions
|
@ -88,6 +88,12 @@ bool Disassembler::load_library() {
|
|||
os::jvm_path(buf, sizeof(buf));
|
||||
int jvm_offset = -1;
|
||||
int lib_offset = -1;
|
||||
#ifdef STATIC_BUILD
|
||||
char* p = strrchr(buf, '/');
|
||||
*p = '\0';
|
||||
strcat(p, "/lib/");
|
||||
lib_offset = jvm_offset = strlen(buf);
|
||||
#else
|
||||
{
|
||||
// Match "jvm[^/]*" in jvm_path.
|
||||
const char* base = buf;
|
||||
|
@ -96,6 +102,7 @@ bool Disassembler::load_library() {
|
|||
p = strstr(p ? p : base, "jvm");
|
||||
if (p != NULL) jvm_offset = p - base;
|
||||
}
|
||||
#endif
|
||||
// Find the disassembler shared library.
|
||||
// Search for several paths derived from libjvm, in this order:
|
||||
// 1. <home>/jre/lib/<arch>/<vm>/libhsdis-<arch>.so (for compatibility)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue