frida 16.3.0 → 16.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/meson.build CHANGED
@@ -5,6 +5,9 @@ project('frida-node', 'cpp',
5
5
  meson_version: '>=1.1.0',
6
6
  )
7
7
 
8
+ cpp = meson.get_compiler('cpp')
9
+ strip = (cpp.get_argument_syntax() == 'msvc') ? '' : find_program('strip')
10
+
8
11
  node = find_program('node')
9
12
  npm = find_program('npm')
10
13
  python = import('python').find_installation()
@@ -75,6 +78,7 @@ endforeach
75
78
 
76
79
  extra_cpp_args = []
77
80
  extra_link_args = []
81
+ extra_link_depends = []
78
82
 
79
83
  foreach d : node_defines
80
84
  extra_cpp_args += '-D' + d
@@ -125,6 +129,7 @@ binding = shared_module('frida_binding', frida_binding_sources,
125
129
  '-DFRIDA_' + runtime.underscorify().to_upper(),
126
130
  ] + extra_cpp_args,
127
131
  link_args: node_libs + extra_link_args,
132
+ link_depends: extra_link_depends,
128
133
  dependencies: [frida_core_dep, nan_dep],
129
134
  install: true,
130
135
  install_dir: pkg_install_dir / 'build',
@@ -136,6 +141,8 @@ custom_target('prebuild',
136
141
  command: [
137
142
  python,
138
143
  files('scripts' / 'package.py'),
144
+ '>>>', strip, '<<<',
145
+ get_option('strip').to_string(),
139
146
  '@INPUT@',
140
147
  '@OUTPUT@',
141
148
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frida",
3
- "version": "16.3.0",
3
+ "version": "16.3.1",
4
4
  "authors": [
5
5
  "Frida Developers"
6
6
  ],
@@ -1,14 +1,54 @@
1
- from pathlib import Path
1
+ import os
2
+ import shutil
3
+ import subprocess
2
4
  import sys
3
5
  import tarfile
6
+ from pathlib import Path
7
+ from typing import Optional
4
8
 
5
9
 
6
10
  def main(argv: list[str]):
7
- binding = Path(argv[1])
8
- outfile = Path(argv[2])
11
+ args = argv[1:]
12
+ strip_command = pop_cmd_array_arg(args)
13
+ strip_enabled = args.pop(0) == "true"
14
+ binding = Path(args.pop(0))
15
+ outfile = Path(args.pop(0))
16
+
17
+ intermediate_path = outfile.parent / f"{outfile.name}.tmp"
18
+ shutil.copy(binding, intermediate_path)
19
+
20
+ try:
21
+ if strip_enabled and strip_command is not None:
22
+ subprocess.run(
23
+ strip_command + [intermediate_path],
24
+ stdout=subprocess.PIPE,
25
+ stderr=subprocess.STDOUT,
26
+ encoding="utf-8",
27
+ check=True,
28
+ )
29
+
30
+ with tarfile.open(outfile, "w:gz") as tar:
31
+ tar.add(intermediate_path, arcname="build/frida_binding.node")
32
+ except subprocess.CalledProcessError as e:
33
+ print(e, file=sys.stderr)
34
+ print("Output:\n\t| " + "\n\t| ".join(e.output.strip().split("\n")), file=sys.stderr)
35
+ sys.exit(1)
36
+ finally:
37
+ os.unlink(intermediate_path)
38
+
9
39
 
10
- with tarfile.open(outfile, "w:gz") as tar:
11
- tar.add(binding, arcname="build/frida_binding.node")
40
+ def pop_cmd_array_arg(args: list[str]) -> Optional[list[str]]:
41
+ result = []
42
+ first = args.pop(0)
43
+ assert first == ">>>"
44
+ while True:
45
+ cur = args.pop(0)
46
+ if cur == "<<<":
47
+ break
48
+ result.append(cur)
49
+ if len(result) == 1 and not result[0]:
50
+ return None
51
+ return result
12
52
 
13
53
 
14
54
  if __name__ == "__main__":
@@ -0,0 +1 @@
1
+ # No exported symbols.
@@ -0,0 +1,4 @@
1
+ {
2
+ local:
3
+ *;
4
+ };
package/src/meson.build CHANGED
@@ -25,3 +25,19 @@ frida_binding_sources = files(
25
25
  'glib_context.cc',
26
26
  'win_delay_load_hook.cc',
27
27
  )
28
+
29
+ if system == 'windows'
30
+ if cpp.get_argument_syntax() != 'msvc'
31
+ symfile = 'addon.symbols'
32
+ extra_link_args += '-Wl,--retain-symbols-file,' + meson.current_source_dir() / symfile
33
+ extra_link_depends += files(symfile)
34
+ endif
35
+ elif system == 'darwin'
36
+ symlist = 'addon.symbols'
37
+ extra_link_args += '-Wl,-exported_symbols_list,' + meson.current_source_dir() / symlist
38
+ extra_link_depends += files(symlist)
39
+ else
40
+ symscript = 'addon.version'
41
+ extra_link_args += '-Wl,--version-script,' + meson.current_source_dir() / symscript
42
+ extra_link_depends += files(symscript)
43
+ endif
@@ -1,6 +1,6 @@
1
1
  [wrap-git]
2
2
  url = https://github.com/frida/frida-core.git
3
- revision = 16.3.0
3
+ revision = 16.3.1
4
4
  depth = 1
5
5
 
6
6
  [provide]