diff options
| author | Thomas Lively <tlively@google.com> | 2019-07-03 22:04:54 +0000 |
|---|---|---|
| committer | Thomas Lively <tlively@google.com> | 2019-07-03 22:04:54 +0000 |
| commit | 6004d9a13d1f5796844d802ff0486f842a06f674 (patch) | |
| tree | 4ef1c40af1c8d3f4ee41c6a9dc9a2130f3a38893 /lld/wasm/OutputSegment.h | |
| parent | c96c174557c079aab31429aed3f3f8ec34384592 (diff) | |
| download | bcm5719-llvm-6004d9a13d1f5796844d802ff0486f842a06f674.tar.gz bcm5719-llvm-6004d9a13d1f5796844d802ff0486f842a06f674.zip | |
[WebAssembly] Add option to emit passive segments
Summary:
Adds `--passive-segments` and `--active-segments` flags to control
what kind of segments are emitted. For now the default is always
to emit active segments so this is not a breaking change, but in
the future the default will be changed to passive segments when
shared memory is requested and active segments otherwise. When
passive segments are emitted, corresponding memory.init and
data.drop instructions are emitted in a `__wasm_init_memory`
function that is automatically called at the beginning of
`__wasm_call_ctors`.
Reviewers: sbc100, aheejin, dschuff
Subscribers: azakai, dschuff, jgravelle-google, sunfish, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59343
llvm-svn: 365088
Diffstat (limited to 'lld/wasm/OutputSegment.h')
| -rw-r--r-- | lld/wasm/OutputSegment.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lld/wasm/OutputSegment.h b/lld/wasm/OutputSegment.h index 782b43bd7ee..a9679c1d675 100644 --- a/lld/wasm/OutputSegment.h +++ b/lld/wasm/OutputSegment.h @@ -33,6 +33,7 @@ public: StringRef Name; const uint32_t Index; + uint32_t InitFlags = 0; uint32_t SectionOffset = 0; uint32_t Alignment = 0; uint32_t StartVA = 0; |

