mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +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
|
@ -442,6 +442,10 @@ void os::init_system_properties_values() {
|
|||
if (pslash != NULL) {
|
||||
*pslash = '\0'; // Get rid of /{client|server|hotspot}.
|
||||
}
|
||||
#ifdef STATIC_BUILD
|
||||
strcat(buf, "/lib");
|
||||
#endif
|
||||
|
||||
Arguments::set_dll_dir(buf);
|
||||
|
||||
if (pslash != NULL) {
|
||||
|
@ -1390,6 +1394,9 @@ bool os::dll_address_to_library_name(address addr, char* buf,
|
|||
|
||||
#ifdef __APPLE__
|
||||
void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
||||
#ifdef STATIC_BUILD
|
||||
return os::get_default_process_handle();
|
||||
#else
|
||||
void * result= ::dlopen(filename, RTLD_LAZY);
|
||||
if (result != NULL) {
|
||||
// Successful loading
|
||||
|
@ -1401,9 +1408,13 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
|||
ebuf[ebuflen-1]='\0';
|
||||
|
||||
return NULL;
|
||||
#endif // STATIC_BUILD
|
||||
}
|
||||
#else
|
||||
void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
||||
#ifdef STATIC_BUILD
|
||||
return os::get_default_process_handle();
|
||||
#else
|
||||
void * result= ::dlopen(filename, RTLD_LAZY);
|
||||
if (result != NULL) {
|
||||
// Successful loading
|
||||
|
@ -1576,6 +1587,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
|||
}
|
||||
|
||||
return NULL;
|
||||
#endif // STATIC_BUILD
|
||||
}
|
||||
#endif // !__APPLE__
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue