Changeset 262096 in webkit for trunk/Source/JavaScriptCore/shell


Ignore:
Timestamp:
May 22, 2020, 10:55:53 PM (5 years ago)
Author:
[email protected]
Message:

[PlayStation] Enable JSC shell to run
https://bugs.webkit.org/show_bug.cgi?id=212294

Reviewed by Ross Kirsling.

.:

  • Source/cmake/OptionsPlayStation.cmake:

Source/JavaScriptCore:

  • shell/PlatformPlayStation.cmake:

Set working directory for Visual Studio

  • shell/playstation/Initializer.cpp:

Load libJavaScriptCore as we now build it as SHARED.

Location:
trunk/Source/JavaScriptCore/shell
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/shell/PlatformPlayStation.cmake

    r256930 r262096  
    2020set(PLAYSTATION_jsc_PROCESS_NAME "JSCShell")
    2121set(PLAYSTATION_jsc_MAIN_THREAD_NAME "JSCShell")
     22
     23# Set the debugger working directory for Visual Studio
     24if (${CMAKE_GENERATOR} MATCHES "Visual Studio")
     25    set_target_properties(jsc PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
     26endif ()
  • trunk/Source/JavaScriptCore/shell/playstation/Initializer.cpp

    r245600 r262096  
    3030#include <dlfcn.h>
    3131
     32static void loadLibraryOrExit(const char* name)
     33{
     34    if (!dlopen(name, RTLD_NOW)) {
     35        fprintf(stderr, "Failed to load %s.\n", name);
     36        exit(EXIT_FAILURE);
     37    }
     38}
     39
    3240__attribute__((constructor(101)))
    3341static void initializer(void)
    3442{
    35     void* handle = dlopen("SystemServices", RTLD_NOW);
    36     if (!handle)
    37         exit(1);
    38     handle = dlopen("Perf", RTLD_NOW);
    39     if (!handle)
    40         exit(1);
    41     handle = dlopen("PosixWebKit", RTLD_NOW);
    42     if (!handle)
    43         exit(1);
     43    loadLibraryOrExit("SystemServices");
     44    loadLibraryOrExit("Perf");
     45    loadLibraryOrExit("PosixWebKit");
     46    loadLibraryOrExit("libJavaScriptCore");
    4447}
Note: See TracChangeset for help on using the changeset viewer.