@geastack/host 0.1.18 → 0.1.19

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.
Files changed (2) hide show
  1. package/host/image.cpp +11 -1
  2. package/package.json +1 -1
package/host/image.cpp CHANGED
@@ -67,12 +67,22 @@ bool ensureMounted() {
67
67
  }
68
68
  } // namespace gea::platform::storage
69
69
 
70
+ // Optional hooks a generated program defines weakly. A COFF linker cannot pair
71
+ // a weak reference with a weak definition (each names its own default), so a
72
+ // target that links a default for every such hook (lld-link /alternatename)
73
+ // sets GEA_LINKED_HOOK_DEFAULTS and the references become ordinary ones.
74
+ #if defined(GEA_LINKED_HOOK_DEFAULTS) && GEA_LINKED_HOOK_DEFAULTS
75
+ #define GEA_PROGRAM_HOOK
76
+ #else
77
+ #define GEA_PROGRAM_HOOK __attribute__((weak))
78
+ #endif
79
+
70
80
  namespace gea::host {
71
81
 
72
82
  extern "C" bool gea_embedded_asset_lookup(const char *path,
73
83
  const unsigned char **data,
74
84
  unsigned long *length)
75
- __attribute__((weak));
85
+ GEA_PROGRAM_HOOK;
76
86
 
77
87
  namespace {
78
88
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geastack/host",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "GeaStack host bindings and platform service sources.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {