Skip to content

Commit

Permalink
chore: change nodejs binary and headers
Browse files Browse the repository at this point in the history
  • Loading branch information
githubquiet committed Oct 20, 2023
1 parent 100add9 commit 134db0f
Show file tree
Hide file tree
Showing 506 changed files with 164,440 additions and 72,212 deletions.
74,172 changes: 37,078 additions & 37,094 deletions packages/backend/package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions packages/backend/src/backendManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AppModule } from './nest/app.module'
import { ConnectionsManagerService } from './nest/connections-manager/connections-manager.service'
import { TorControl } from './nest/tor/tor-control.service'
import { torBinForPlatform, torDirForPlatform } from './nest/common/utils'
import initRnBridge from './rn-bridge'
// import initRnBridge from './rn-bridge'

import logger from './nest/common/logger'
const log = logger('backendManager')
Expand Down Expand Up @@ -92,7 +92,7 @@ export const runBackendMobile = async (): Promise<any> => {
process.env['BACKEND'] = 'mobile'
process.env['CONNECTION_TIME'] = (new Date().getTime() / 1000).toString() // Get time in seconds

const rn_bridge = initRnBridge()
// const rn_bridge = initRnBridge()

const app: INestApplicationContext = await NestFactory.createApplicationContext(
AppModule.forOptions({
Expand All @@ -111,16 +111,16 @@ export const runBackendMobile = async (): Promise<any> => {
{ logger: ['warn', 'error', 'log', 'debug', 'verbose'] }
)

rn_bridge.channel.on('close', async () => {
const connectionsManager = app.get<ConnectionsManagerService>(ConnectionsManagerService)
connectionsManager.closeSocket()
})
rn_bridge.channel.on('open', async (msg: OpenServices) => {
const connectionsManager = app.get<ConnectionsManagerService>(ConnectionsManagerService)
const torControlParams = app.get<TorControl>(TorControl)
torControlParams.torControlParams.auth.value = msg.authCookie
await connectionsManager.openSocket()
})
// rn_bridge.channel.on('close', async () => {
// const connectionsManager = app.get<ConnectionsManagerService>(ConnectionsManagerService)
// connectionsManager.closeSocket()
// })
// rn_bridge.channel.on('open', async (msg: OpenServices) => {
// const connectionsManager = app.get<ConnectionsManagerService>(ConnectionsManagerService)
// const torControlParams = app.get<TorControl>(TorControl)
// torControlParams.torControlParams.auth.value = msg.authCookie
// await connectionsManager.openSocket()
// })
}

const platform = options.platform
Expand Down

This file was deleted.

57 changes: 24 additions & 33 deletions packages/mobile/ios/NodeJsMobile/libnode/include/node/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
'enable_pgo_generate%': '0',
'enable_pgo_use%': '0',
'python%': 'python',
'iossim%': 'false',

'node_shared%': 'false',
'force_dynamic_crt%': 0,
Expand All @@ -28,15 +29,15 @@
'clang%': 0,
'error_on_warn%': 'false',

'openssl_fips%': '',
'openssl_product': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
'openssl_no_asm%': 0,

# Don't use ICU data file (icudtl.dat) from V8, we use our own.
'icu_use_data_file_flag%': 0,

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.22',
'v8_embedder_string': '-node.26',

##### V8 defaults for Node.js #####

Expand Down Expand Up @@ -66,10 +67,6 @@
'v8_enable_pointer_compression%': 0,
'v8_enable_31bit_smis_on_64bit_arch%': 0,

# Disable V8 untrusted code mitigations.
# See https://github.com/v8/v8/wiki/Untrusted-code-mitigations
'v8_untrusted_code_mitigations': 0,

# Disable v8 hugepage by default.
'v8_enable_hugepage%': 0,

Expand Down Expand Up @@ -101,11 +98,6 @@
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a',
}],
['openssl_fips != ""', {
'openssl_product': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
}, {
'openssl_product': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
}],
['OS=="mac" or OS == "ios"', {
'clang%': 1,
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
Expand Down Expand Up @@ -146,7 +138,7 @@
'defines': [ 'DEBUG', '_DEBUG', 'V8_ENABLE_CHECKS' ],
'cflags': [ '-g', '-O0' ],
'conditions': [
['OS=="aix"', {
['OS in "aix os400"', {
'cflags': [ '-gxcoff' ],
'ldflags': [ '-Wl,-bbigtoc' ],
}],
Expand Down Expand Up @@ -221,6 +213,9 @@
'cflags': [ '-qINLINE=::150:100000' ]
}],
['OS!="mac" and OS!="ios" and OS!="win" and OS!="zos"', {
# -fno-omit-frame-pointer is necessary for the --perf_basic_prof
# flag to work correctly. perf(1) gets confused about JS stack
# frames otherwise, even with --call-graph dwarf.
'cflags': [ '-fno-omit-frame-pointer' ],
}],
['OS=="linux"', {
Expand Down Expand Up @@ -284,13 +279,12 @@
],
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': ['/Zc:__cplusplus'],
'BufferSecurityCheck': 'true',
'target_conditions': [
['_toolset=="target"', {
'DebugInformationFormat': 1 # /Z7 embed info in .obj files
}],
'AdditionalOptions': [
'/Zc:__cplusplus',
'-std:c++17'
],
'BufferSecurityCheck': 'true',
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
'ExceptionHandling': 0, # /EHsc
'MultiProcessorCompilation': 'true',
'StringPooling': 'true', # pool string literals
Expand Down Expand Up @@ -400,13 +394,13 @@
'BUILDING_UV_SHARED=1',
],
}],
[ 'OS in "linux freebsd openbsd solaris aix"', {
[ 'OS in "linux freebsd openbsd solaris aix os400"', {
'cflags': [ '-pthread' ],
'ldflags': [ '-pthread' ],
}],
[ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', {
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++14' ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ],
'defines': [ '__STDC_FORMAT_MACROS' ],
'ldflags': [ '-rdynamic' ],
'target_conditions': [
Expand All @@ -428,11 +422,11 @@
'cflags': [ '-m64' ],
'ldflags': [ '-m64' ],
}],
[ 'target_arch=="ppc" and OS!="aix"', {
[ 'target_arch=="ppc" and OS not in "aix os400"', {
'cflags': [ '-m32' ],
'ldflags': [ '-m32' ],
}],
[ 'target_arch=="ppc64" and OS!="aix"', {
[ 'target_arch=="ppc64" and OS not in "aix os400"', {
'cflags': [ '-m64', '-mminimal-toc' ],
'ldflags': [ '-m64' ],
}],
Expand All @@ -451,7 +445,7 @@
}],
],
}],
[ 'OS=="aix"', {
[ 'OS in "aix os400"', {
'variables': {
# Used to differentiate `AIX` and `OS400`(IBM i).
'aix_variant_name': '<!(uname -s)',
Expand Down Expand Up @@ -524,7 +518,7 @@
'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
'PREBINDING': 'NO', # No -Wl,-prebind
'MACOSX_DEPLOYMENT_TARGET': '10.13', # -mmacosx-version-min=10.13
'MACOSX_DEPLOYMENT_TARGET': '10.15', # -mmacosx-version-min=10.15
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
'-fno-strict-aliasing',
Expand Down Expand Up @@ -563,7 +557,7 @@
['clang==1', {
'xcode_settings': {
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++14', # -std=gnu++14
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++17', # -std=gnu++17
'CLANG_CXX_LIBRARY': 'libc++',
},
}],
Expand All @@ -580,7 +574,7 @@
'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
'PREBINDING': 'NO', # No -Wl,-prebind
'IPHONEOS_DEPLOYMENT_TARGET': '11.0', # -miphoneos-version-min=11.0
'IPHONEOS_DEPLOYMENT_TARGET': '13.0', # -miphoneos-version-min=13.0
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
'-fno-strict-aliasing',
Expand Down Expand Up @@ -609,7 +603,7 @@
['target_arch=="x64"', {
'xcode_settings': {'ARCHS': ['x86_64']},
}],
[ 'target_arch in "arm64 arm armv7s"', {
['iossim!="true" and target_arch in "arm64 arm armv7s"', {
'xcode_settings': {
'OTHER_CFLAGS': [
'-fembed-bitcode'
Expand All @@ -631,20 +625,17 @@
['clang==1', {
'xcode_settings': {
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++1y', # -std=gnu++1y
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++17', # -std=gnu++17
'CLANG_CXX_LIBRARY': 'libc++',
},
}],
['target_arch=="x64" or target_arch=="ia32"', {
['target_arch=="x64" or target_arch=="ia32" or (target_arch=="arm64" and iossim=="true")', {
'xcode_settings': { 'SDKROOT': 'iphonesimulator' },
}, {
'xcode_settings': { 'SDKROOT': 'iphoneos', 'ENABLE_BITCODE': 'YES' },
}],
],
}],
['OS=="freebsd" and node_use_dtrace=="true"', {
'libraries': [ '-lelf' ],
}],
['OS=="freebsd"', {
'ldflags': [
'-Wl,--export-dynamic',
Expand Down
Loading

0 comments on commit 134db0f

Please sign in to comment.