File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ endif(LLVM_ENABLE_ASSERTIONS)
79
79
set (LLVM_OPTIONAL_SOURCES
80
80
SwiftRT-COFF.cpp
81
81
SwiftRT-ELF.cpp
82
+ SwiftRT-WASM.cpp
82
83
${swift_runtime_sources}
83
84
${swift_runtime_objc_sources}
84
85
${swift_runtime_leaks_sources} )
Original file line number Diff line number Diff line change @@ -46,16 +46,9 @@ static swift::MetadataSections sections{};
46
46
47
47
__attribute__ ((__constructor__))
48
48
static void swift_image_constructor() {
49
- #ifndef __wasm__
50
49
#define SWIFT_SECTION_RANGE (name ) \
51
50
{ reinterpret_cast <uintptr_t >(&__start_##name), \
52
51
static_cast <uintptr_t >(&__stop_##name - &__start_##name) }
53
- #else
54
- // WebAssembly hack: ok this should really go in its own file
55
- #define SWIFT_SECTION_RANGE (name ) \
56
- { reinterpret_cast <uintptr_t >(&__start_##name) + sizeof (void *), \
57
- static_cast <uintptr_t >(&__stop_##name - &__start_##name - sizeof (void *)) }
58
- #endif
59
52
60
53
sections = {
61
54
swift::CurrentSectionMetadataVersion,
Original file line number Diff line number Diff line change
1
+ // ===--- SwiftRT-WASM.cpp --------------------------------------------------===//
2
+ //
3
+ // This source file is part of the Swift.org open source project
4
+ //
5
+ // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6
+ // Licensed under Apache License v2.0 with Runtime Library Exception
7
+ //
8
+ // See https://swift.org/LICENSE.txt for license information
9
+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10
+ //
11
+ // ===----------------------------------------------------------------------===//
You can’t perform that action at this time.
0 commit comments