| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3be5ff9 commit 9b164c6
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1441,13 +1441,16 @@ static ExitCode StartInternal(int argc, char** argv) { | |||
| 1441 | 1441 | }); | |
| 1442 | 1442 | ||
| 1443 | 1443 | uv_loop_configure(uv_default_loop(), UV_METRICS_IDLE_TIME); | |
| 1444 | - | ||
| 1445 | 1444 | std::string sea_config = per_process::cli_options->experimental_sea_config; | |
| 1446 | 1445 | if (!sea_config.empty()) { | |
| 1446 | + #if !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION) | ||
| 1447 | 1447 | return sea::BuildSingleExecutableBlob( | |
| 1448 | 1448 | sea_config, result->args(), result->exec_args()); | |
| 1449 | + #else | ||
| 1450 | + fprintf(stderr, "Single executable application is disabled.\n"); | ||
| 1451 | + return ExitCode::kGenericUserError; | ||
| 1452 | + #endif // !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION) | ||
| 1449 | 1453 | } | |
| 1450 | - | ||
| 1451 | 1454 | // --build-snapshot indicates that we are in snapshot building mode. | |
| 1452 | 1455 | if (per_process::cli_options->per_isolate->build_snapshot) { | |
| 1453 | 1456 | if (per_process::cli_options->per_isolate->build_snapshot_config.empty() && | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,8 +27,6 @@ | |||
| 27 | 27 | #include <tuple> | |
| 28 | 28 | #include <vector> | |
| 29 | 29 | ||
| 30 | - #if !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION) | ||
| 31 | - | ||
| 32 | 30 | using node::ExitCode; | |
| 33 | 31 | using v8::ArrayBuffer; | |
| 34 | 32 | using v8::BackingStore; | |
@@ -189,6 +187,7 @@ SeaResource SeaDeserializer::Read() { | |||
| 189 | 187 | } | |
| 190 | 188 | ||
| 191 | 189 | std::string_view FindSingleExecutableBlob() { | |
| 190 | + #if !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION) | ||
| 192 | 191 | CHECK(IsSingleExecutable()); | |
| 193 | 192 | static const std::string_view result = []() -> std::string_view { | |
| 194 | 193 | size_t size; | |
@@ -209,6 +208,9 @@ std::string_view FindSingleExecutableBlob() { | |||
| 209 | 208 | result.data(), | |
| 210 | 209 | result.size()); | |
| 211 | 210 | return result; | |
| 211 | + #else | ||
| 212 | + UNREACHABLE(); | ||
| 213 | + #endif // !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION) | ||
| 212 | 214 | } | |
| 213 | 215 | ||
| 214 | 216 | } // anonymous namespace | |
@@ -668,5 +670,3 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { | |||
| 668 | 670 | ||
| 669 | 671 | NODE_BINDING_CONTEXT_AWARE_INTERNAL(sea, node::sea::Initialize) | |
| 670 | 672 | NODE_BINDING_EXTERNAL_REFERENCE(sea, node::sea::RegisterExternalReferences) | |
| 671 | - | ||
| 672 | - #endif // !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,8 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | 4 | #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS | |
| 5 | 5 | ||
| 6 | - #if !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION) | ||
| 7 | - | ||
| 8 | 6 | #include <cinttypes> | |
| 9 | 7 | #include <optional> | |
| 10 | 8 | #include <string> | |
@@ -52,8 +50,6 @@ node::ExitCode BuildSingleExecutableBlob( | |||
| 52 | 50 | } // namespace sea | |
| 53 | 51 | } // namespace node | |
| 54 | 52 | ||
| 55 | - #endif // !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION) | ||
| 56 | - | ||
| 57 | 53 | #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS | |
| 58 | 54 | ||
| 59 | 55 | #endif // SRC_NODE_SEA_H_ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments