[PATCH] D149917: [lld][WebAssembly] Add --keep-section flag

2023-11-02 Thread Sam Clegg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG89d5635f0a83: [lld][WebAssembly] Add --keep-section flag (authored by sbc100). Changed prior to commit: https://reviews.llvm.org/D149917?vs=557960=557993#toc Repository: rG LLVM Github Monorepo

[PATCH] D149917: [lld][WebAssembly] Add --keep-section flag

2023-11-01 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. PTAL Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149917/new/ https://reviews.llvm.org/D149917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D149917: [lld][WebAssembly] Add --keep-section flag

2023-11-01 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 557960. sbc100 added a comment. - feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149917/new/ https://reviews.llvm.org/D149917 Files: clang/lib/Driver/ToolChains/WebAssembly.cpp

[PATCH] D149917: [lld][WebAssembly] Add --keep-section flag

2023-11-01 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 557959. sbc100 marked an inline comment as done. sbc100 added a comment. - feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149917/new/ https://reviews.llvm.org/D149917 Files:

[PATCH] D149917: [lld][WebAssembly] Add --keep-section flag

2023-11-01 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 557958. sbc100 marked an inline comment as done. sbc100 added a comment. - feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149917/new/ https://reviews.llvm.org/D149917 Files:

[PATCH] D149917: [lld][WebAssembly] Add --preserve-features flag

2023-10-30 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Updated to use `--keep-section`. PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149917/new/ https://reviews.llvm.org/D149917 ___ cfe-commits mailing list

[PATCH] D149917: [lld][WebAssembly] Add --preserve-features flag

2023-10-30 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 557937. sbc100 added a comment. - rename flag Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149917/new/ https://reviews.llvm.org/D149917 Files: clang/lib/Driver/ToolChains/WebAssembly.cpp

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. ood idea after all. Is there a suitable place where we could mo Comment at: clang/lib/Interpreter/WASM.cpp:79 + int Result = + lld::wasm::link(LinkerArgs, llvm::outs(), llvm::errs(), false, false); + if (!Result) v.g.vassilev

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I suppose you could build a similar thing that runs under node and uses that `wasi-unknown-unknown` target? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158140/new/ https://reviews.llvm.org/D158140

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Very nice idea! Comment at: clang/lib/Interpreter/CMakeLists.txt:21 Value.cpp + WASM.cpp Elsewhere in LLVM either use WebAssembly (spelled out). If you really prefer to keep it short you should use `Wasm` (not all caps). Also,

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-21 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/CMakeLists.txt:179-183 +if(DEFAULT_SYSROOT) + message(WARNING "DEFAULT_SYSROOT is deprecated and will be removed. Use " +"configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)" +"to

[PATCH] D158409: [WebAssembly] Add multiple memories feature

2023-08-21 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D158409#4603829 , @tlively wrote: > The other file to update here is clang/test/Driver/wasm-features.c. It looks > like we haven't been as consistent about updating that one. Darn it, you beat be by 2 minutes. Repository:

[PATCH] D158409: [WebAssembly] Add multiple memories feature

2023-08-21 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/include/clang/Driver/Options.td:4583 def mno_extended_const : Flag<["-"], "mno-extended-const">, Group; +def mmulti_memories : Flag<["-"], "mmulti-memories">, Group; +def mno_multi_memories : Flag<["-"], "mno-multi-memories">,

[PATCH] D156205: [clang][WebAssembly] Link crt1 even in case of -shared

2023-08-14 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. (update change title to use the `[clang][WebAssembly]`convention) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156205/new/ https://reviews.llvm.org/D156205 ___ cfe-commits

[PATCH] D156205: wasm: link crt1 even in case of -shared

2023-08-14 Thread Sam Clegg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG989ce069a463: [clang][WebAssembly] Link crt1 even in case of -shared (authored by yamt, committed by sbc100). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D57896: Variable names rule

2023-08-02 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Herald added a project: All. Is there still appetite to land this change?We made the switch over in LLD a while back without any issues that I know of. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57896/new/

[PATCH] D156205: wasm: link crt1 even in case of -shared

2023-08-02 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/WebAssembly.cpp:80 - const char *Crt1 = "crt1.o"; + bool isCommand = true; + const char *Crt1; LLCM coding

[PATCH] D156205: wasm: link crt1 even in case of -shared

2023-07-25 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I think we are vearing into somewhat uncharted territory here, but we should probably push forward and document the direction we choose. Should `-shared` modules also link with `crt1-reactor.o` by default then? Or should we add `crt1-shared.o` and use the whenever

[PATCH] D150803: [WebAssembly] Support `annotate` clang attributes for marking functions.

2023-07-10 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. lgtm. Can you update the change description now that we decided to not support values? (Ironically I think have a use for values in pipeline now) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D150803: [WebAssembly] Support `annotate` clang attributes for marking functions.

2023-06-27 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:585-598 +// The fifth field is an optional pointer to the arguments. Append each +// argument to the name separated by a '.'. +auto *ArgsVar =

[PATCH] D150803: Add a new `wasm_custom` clang attribute for marking functions.

2023-06-27 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D150803#4454164 , @brendandahl wrote: > In D150803#4440802 , @aaron.ballman > wrote: > >> Marking as requested changes so it's clear there's more worth discussing, so >> we don't

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-06-27 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 abandoned this revision. sbc100 added a comment. Yes, on further investigation is seems that there is precedent for having `alignof(max_align_t)` and `__BIGGEST_ALIGNMENT__` be different. See https://github.com/emscripten-core/emscripten/pull/19728 Repository: rG LLVM Github

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-06-27 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. OK to land this? (With a provision that I will add something to the emscripten changelog?) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151820/new/ https://reviews.llvm.org/D151820

[PATCH] D153293: [clang][WebAssembly] support wasm32-wasi shared libraries

2023-06-26 Thread Sam Clegg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG55e199a2c9f4: [clang][WebAssembly] Support wasm32-wasi shared libraries (authored by dicej, committed by sbc100). Changed prior to commit:

[PATCH] D150803: Add a new `wasm_custom` clang attribute for marking functions.

2023-06-22 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:5608-5612 +Clang supports the ``__attribute__((wasm_async))`` +attribute for the WebAssembly target. This attribute may be attached to a +function definition, which indicates the function will be

[PATCH] D150803: Add a new `wasm_custom` clang attribute for marking functions.

2023-06-22 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:5608-5612 +Clang supports the ``__attribute__((wasm_async))`` +attribute for the WebAssembly target. This attribute may be attached to a +function definition, which indicates the function will be

[PATCH] D153293: [clang][WebAssembly] support wasm32-wasi shared libraries

2023-06-21 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: llvm/utils/lit/lit/llvm/config.py:347 +return triple + m = re.match(r"(\w+)-(\w+)-(\w+)", triple) dicej wrote: > sbc100 wrote: > > Are the the changes to this file meant to be part of this CL? > The

[PATCH] D153293: [clang][WebAssembly] support wasm32-wasi shared libraries

2023-06-21 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D153293#4437644 , @dicej wrote: > In D153293#4436629 , @sbc100 wrote: > >> I'm happy to merge it, but perhaps we should get @sunfish to lg too. >> >> Also, should we remove the

[PATCH] D153293: [clang][WebAssembly] support wasm32-wasi shared libraries

2023-06-20 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I'm happy to merge it, but perhaps we should get @sunfish to lg too. Also, should we remove the `-experimental-pic` linker flag, or are you OK with that warning from the linker? If yes, I wonder if we should do that as part of this CL or a followup? Repository: rG

[PATCH] D153293: [clang][WebAssembly] support wasm32-wasi shared libraries

2023-06-19 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. This revision is now accepted and ready to land. lgtm. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153293/new/ https://reviews.llvm.org/D153293

[PATCH] D153293: [clang][WebAssembly] support wasm32-wasi shared libraries

2023-06-19 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Herald added a subscriber: ormris. Nice! lgtm with a couple of nits Comment at: clang/docs/ReleaseNotes.rst:705 +- The `wasm32-wasi` target now supports `Emscripten-style shared libraries +

[PATCH] D150803: Add a new `wasm_custom` clang attribute for marking functions.

2023-06-13 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D150803#4419370 , @sunfish wrote: > Would it make sense to call this "jspi" in practice, rather than "async"? > Even though this isn't clang's decision per se anymore, it seems like the > reasoning earlier in this review

[PATCH] D150803: Add a new `wasm_custom` clang attribute for marking functions.

2023-06-13 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. This revision is now accepted and ready to land. Nice! Comment at: lld/test/wasm/merge-custom-attr-section.ll:47 +} + +attributes #0 = { "wasm-custom"="custom0" } Is there some reason we can't use assembly

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-06-12 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D151820#4415754 , @dschuff wrote: >> As far as I can tell the only way this change could break XNNpack if >> XNN_ALLOCATION_ALIGNMENT = 8 is wrongly set there... as long as that is the >> correct value for

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-06-12 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Can we land this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151820/new/ https://reviews.llvm.org/D151820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D150803: [WebAssembly] Add a new `wasm_async` clang attribute for marking async functions.

2023-06-06 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D150803#4401552 , @sunfish wrote: > In D150803#4401204 , @sbc100 wrote: > >> In D150803#4401061 , @sunfish >> wrote: >> >>> wasm_jspi works

[PATCH] D150803: [WebAssembly] Add a new `wasm_async` clang attribute for marking async functions.

2023-06-06 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D150803#4401061 , @sunfish wrote: > wasm_jspi works for me. The problem with that is that we will also likely want to use this attribute for asyncify (which is the current async approach we have today) as well as JSPI (which

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-06-06 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D151820#4400795 , @tlively wrote: > In D151820#4385512 , @dschuff wrote: > >> I seem to recall that @tlively and I spent a bunch of time with XNNpack >> chasing down some kind of

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a subscriber: ngzhian. sbc100 added a comment. In D151820#4385568 , @sbc100 wrote: > In D151820#4385536 , @dschuff wrote: > >>> I don't think it will since `__BIGGEST_ALIGNMENT__ >= >>>

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D151820#4385536 , @dschuff wrote: >> I don't think it will since `__BIGGEST_ALIGNMENT__ >= >> XNN_ALLOCATION_ALIGNMENT` will remain true after this change.. so this >> change should have no effect on that code. > > I meant

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D151820#4385512 , @dschuff wrote: >> I don't think it will change anything in that code since >> `__BIGGEST_ALIGNMENT__ >= XNN_ALLOCATION_ALIGNMENT` will still hold true >> both before and after this change

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D151820#4385393 , @dschuff wrote: > I guess this is basically the C version of max_align_t so it should match. Yes, it should match. Having `__BIGGEST_ALIGNMENT__` be 16 for emscripten doesn't make any sense right now. >

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D151820#4385393 , @dschuff wrote: > I guess this is basically the C version of max_align_t so it should match. > but... this still has the potential to break things. True, but I think it's not as likely the break things as

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: pmatos, wingo, sunfish, jgravelle-google, dschuff. Herald added a project: All. sbc100 requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. Follow up to

[PATCH] D150803: [WebAssembly] Add a new `wasm_async` clang attribute for marking async functions.

2023-05-24 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1984 + TargetSpecificAttr { + let Spellings = [Clang<"wasm_async">]; + let Documentation = [WebAssemblyAsyncDocs]; brendandahl wrote: > sbc100 wrote: > > Should

[PATCH] D148573: Allow -fsanitize=function on all targets

2023-05-22 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D148573#4361509 , @MaskRay wrote: > In D148573#4361396 , @sbc100 wrote: > >> This change seems to be causing problems on the emscripten auto-roller: >>

[PATCH] D148573: Allow -fsanitize=function on all targets

2023-05-22 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. (I guess this also mean we are lacking some upstream testing for ubsan + wasm + mc?) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148573/new/ https://reviews.llvm.org/D148573

[PATCH] D148573: Allow -fsanitize=function on all targets

2023-05-22 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. This change seems to be causing problems on the emscripten auto-roller: https://ci.chromium.org/ui/p/emscripten-releases/builders/try/linux/b8780394114149321217/overview Failures show up in ubsan tests and look like this: error: symbol '_Z4testi' unsupported

[PATCH] D150803: [WebAssembly] Add a new `wasm_async` clang attribute for marking async functions.

2023-05-17 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. This change looks really nice. I like the new relocation type, I think we would have had to add that sooner or later anyway. My only major concern is making this attribute available outside of emscripten (i.e. wasm32-unknown-emscripten). It seems like we should maybe

[PATCH] D149917: [lld][WebAssembly] Add --preserve-features flag

2023-05-08 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D149917#4322367 , @dschuff wrote: > Do we want to make this any more general? In the future we might want to > preserve other sections, e.g. passing optimization or profiling info from > LLVM to Binaryen. Or maybe JSPI info?

[PATCH] D149917: [lld][WebAssembly] Add --preserve-features flag

2023-05-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Still needs a test.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149917/new/ https://reviews.llvm.org/D149917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D149917: [lld][WebAssembly] Add --preserve-features flag

2023-05-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: pmatos, asb, wingo, ecnelises, sunfish, jgravelle-google, dschuff. Herald added a project: All. sbc100 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, aheejin. Herald added a project: clang. This flag

[PATCH] D148730: [C11] Allow initialization of an atomic-qualified pointer from a null pointer constant

2023-04-24 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. We bisected a build failure on the emscripten waterfall to this change: https://ci.chromium.org/ui/p/emscripten-releases/builders/try/linux/b878293284529557/overview

[PATCH] D148835: [clang] removes trailing whitespace

2023-04-21 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D148835#4288151 , @erichkeane wrote: > In D148835#4288148 , @cjdb wrote: > >> In D148835#4286924 , >> @aaron.ballman wrote: >> >>> In

[PATCH] D148181: [Demangle] make llvm::demangle take a StringRef; NFC

2023-04-12 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: llvm/lib/Demangle/Demangle.cpp:29 -std::string llvm::demangle(const std::string ) { +std::string llvm::demangle(const StringRef MangledName) { std::string Result; Should `const` be removed? (i.e. is StringRef not

[PATCH] D76547: [WebAssembly] Add `wasm-exported` function attribute

2023-03-29 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 abandoned this revision. sbc100 added a comment. In D76547#4231604 , @aaron.ballman wrote: > In D76547#4231501 , @sbc100 wrote: > >> In D76547#4231476 ,

[PATCH] D76547: [WebAssembly] Add `wasm-exported` function attribute

2023-03-29 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D76547#4231476 , @aaron.ballman wrote: > In D76547#4231422 , @sbc100 wrote: > >> The reason `__attribute__((export_name("foo")))` doesn't work in all use >> cases is that we have a lot

[PATCH] D76547: [WebAssembly] Add `wasm-exported` function attribute

2023-03-29 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. The reason `__attribute__((export_name("foo")))` doesn't work in all use cases is that we have a lot of existing code that uses the `EMSCRIPTEN_KEEPALIVE` macro. We also have run into other folks who want to include this is some kind of `FOO_API`, or `EXPORT_API`

[PATCH] D76547: [WebAssembly] Add `wasm-exported` function attribute

2023-03-23 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I just figured out that this cannot replace the current use of `__attribute__((used))` in emscripten because function attributes only work for functions and we need this mechanism to work for global data addresses too. There is simply no way to do something like

[PATCH] D76547: [WebAssembly] Add `wasm-exported` function attribute

2023-03-23 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 507826. sbc100 edited the summary of this revision. sbc100 added a comment. - limit to emscripten Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76547/new/ https://reviews.llvm.org/D76547 Files:

[PATCH] D76547: [WebAssembly] Add `wasm-exported` function attribute

2023-03-23 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I've limited to new attribute to only the emcripten triple. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76547/new/ https://reviews.llvm.org/D76547 ___ cfe-commits mailing list

[PATCH] D76547: [WebAssembly] Add `wasm-exported` function attribute

2023-03-23 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 507807. sbc100 added a comment. - update test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76547/new/ https://reviews.llvm.org/D76547 Files: clang/include/clang/Basic/Attr.td

[PATCH] D76547: [WebAssembly] Add wasm-exported function attribute

2023-03-23 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D76547#1945094 , @sbc100 wrote: > What about your idea of using the `default` keyword rather than adding a new > clang attr? I quite liked that approach. IIRC I tried this approach but wan't able to make it works since a

[PATCH] D76547: [WebAssembly] Add wasm-exported function attribute

2023-03-23 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 507802. sbc100 added a comment. Herald added a reviewer: aaron.ballman. Herald added subscribers: llvm-commits, pmatos, asb, wingo, ecnelises. Herald added projects: LLVM, All. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142740: [WIP] [WebAssembly] Enable MemorySanitizer for emscripten

2023-01-27 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: Enna1, pmatos, asb, wingo, ecnelises, sunfish, hiraditya, jgravelle-google, dschuff. Herald added a project: All. sbc100 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, MaskRay, aheejin. Herald added

[PATCH] D137227: [asan] Default to -fsanitize-address-use-odr-indicator for non-Windows

2022-11-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. > The asan instrumentation just prepends `__odr_asan_gen_` to the symbol name > to form a new symbol name. For ELF every byte except `\0` can be used in a > symbol name, and this is totally fine. > > I am unfamiliar with WebAssembly. Does the aforementioned parsing tool

[PATCH] D137227: [asan] Default to -fsanitize-address-use-odr-indicator for non-Windows

2022-11-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. At least for WebAssembly object files, it looks like the symbol table now contains (what look like) demangled symbols. e.g.: $ llvm-nm /tmp/emscripten_temp/command_0.o 3ef5 D __odr_asan_gen__numargs 41a6 D __odr_asan_gen__stdcmd<1068>::init 41c3 D

[PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-09-05 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. This change also broken emscripten in some odd ways: https://app.circleci.com/pipelines/github/emscripten-core/emscripten/23359/workflows/4080be5f-bd82-45b9-a355-3a5d4f4ef977/jobs/564543. The revert seems to have fixed it. Repository: rG LLVM Github Monorepo

[PATCH] D131217: [clang][WebAssembly] Pass `-Wl,-no-type-check` through to the MC layer

2022-09-01 Thread Sam Clegg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG849df8f6f0a6: [clang][WebAssembly] Pass `-Wa,--no-type-check` through to the MC layer (authored by sbc100). Changed prior to commit: https://reviews.llvm.org/D131217?vs=454128=457215#toc Repository:

[PATCH] D131217: [clang][WebAssembly] Pass `-Wl,-no-type-check` through to the MC layer

2022-08-19 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 454128. sbc100 added a comment. improve test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131217/new/ https://reviews.llvm.org/D131217 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D131217: [clang][WebAssembly] Pass `-Wl,-no-type-check` through to the MC layer

2022-08-19 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 454122. sbc100 added a comment. add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131217/new/ https://reviews.llvm.org/D131217 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D131217: [WIP][clang][WebAssembly] Pass `-Wl, -no-type-check` through to the MC layer

2022-08-19 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. ptal Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131217/new/ https://reviews.llvm.org/D131217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D125728: [WebAssembly] Update supported features in -mcpu=generic

2022-08-19 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Emscripten-side change in preparation for this to land: https://github.com/emscripten-core/emscripten/pull/17689 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125728/new/ https://reviews.llvm.org/D125728

[PATCH] D130788: [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON.

2022-08-19 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. https://chromium-review.googlesource.com/c/emscripten-releases/+/3842345... I suppose the alternative would be to keep the backup method that was previously working in our case (but not in yours)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D130788: [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON.

2022-08-18 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D130788#3731232 , @sunho wrote: > In D130788#3730533 , @sbc100 wrote: > >> I'm not totally sure but I think the change is responsible for the >> emscripten integration bot failing

[PATCH] D130788: [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON.

2022-08-17 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I'm not totally sure but I think the change is responsible for the emscripten integration bot failing `InterpreterTest.CatchException`: https://logs.chromium.org/logs/emscripten-releases/buildbucket/cr-buildbucket/8807160007692150337/+/u/LLVM_regression/stdout

[PATCH] D131217: [WIP][clang][WebAssembly] Pass `-Wl, -no-type-check` through to the MC layer

2022-08-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 450196. sbc100 added a comment. - remove debugging Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131217/new/ https://reviews.llvm.org/D131217 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D131217: [clang][WebAssembly] Pass `-Wl,-no-type-check` through to the MC layer

2022-08-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D131217#3701363 , @MaskRay wrote: > Test? > > And we should not have `llvm::dbgs() << "Main " << Opts.NoTypeCheck << "\n";` > by default. Sorry, as as said above "Work in progress -- still needs a test." Repository: rG

[PATCH] D131217: [clang][WebAssembly] Pass `-Wl,-no-type-check` through to the MC layer

2022-08-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Work in progress -- still needs a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131217/new/ https://reviews.llvm.org/D131217 ___ cfe-commits mailing list

[PATCH] D131217: [clang][WebAssembly] Pass `-Wl,-no-type-check` through to the MC layer

2022-08-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: pmatos, wingo, ecnelises, sunfish, jgravelle-google, dschuff. Herald added a project: All. sbc100 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, aheejin. Herald added a project: clang. Repository: rG

[PATCH] D125728: [WebAssembly] Update supported features in -mcpu=generic

2022-07-27 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. This revision is now accepted and ready to land. Do you think we should backport this to llvm 15, since it missed the branch point? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125728/new/

[PATCH] D127888: [clang][WebAssembly] Loosen restriction on `main` symbol mangling

2022-06-15 Thread Sam Clegg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG78747bd39af8: [clang][WebAssembly] Loosen restriction on `main` symbol mangling (authored by sbc100). Repository: rG LLVM Github Monorepo

[PATCH] D127888: [clang][WebAssembly] Loosen restriction on `main` symbol mangling

2022-06-15 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 437272. sbc100 edited the summary of this revision. sbc100 added a comment. Herald added a subscriber: asb. add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127888/new/ https://reviews.llvm.org/D127888

[PATCH] D127888: [clang][WebAssembly] Loosen restriction on `main` symbol mangling

2022-06-15 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: pmatos, wingo, ecnelises, sunfish, jgravelle-google, dschuff. Herald added a project: All. sbc100 requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. Remove the `hasPrototype()`

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2022-06-06 Thread Sam Clegg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG47039a1a4b29: [WebAssembly] Remove restriction on main name mangling (authored by sbc100). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2022-06-06 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6360 + auto *GA = llvm::GlobalAlias::create("__main_void", F); + GA->setVisibility(F->getVisibility()); +} sbc100 wrote: > sunfish wrote: > > sbc100 wrote: > > > sunfish

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2022-06-06 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 434605. sbc100 added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75277/new/ https://reviews.llvm.org/D75277 Files: clang/lib/AST/Mangle.cpp clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2022-06-01 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 433386. sbc100 added a comment. - feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75277/new/ https://reviews.llvm.org/D75277 Files: clang/lib/AST/Mangle.cpp clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2022-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6360 + auto *GA = llvm::GlobalAlias::create("__main_void", F); + GA->setVisibility(F->getVisibility()); +} sunfish wrote: > sbc100 wrote: > > sunfish wrote: > > > Can

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2022-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6360 + auto *GA = llvm::GlobalAlias::create("__main_void", F); + GA->setVisibility(F->getVisibility()); +} sunfish wrote: > Can this use

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2022-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 433191. sbc100 added a comment. - revert parts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75277/new/ https://reviews.llvm.org/D75277 Files: clang/lib/AST/Mangle.cpp clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2022-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added inline comments. Comment at: llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp:264 - } -} } sunfish wrote: > Why is this code going away? This isn't Emscripten-specific code. Ah.. I was hoping we could delete these

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2022-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 433173. sbc100 added a comment. - update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75277/new/ https://reviews.llvm.org/D75277 Files: clang/lib/AST/Mangle.cpp clang/lib/CodeGen/CodeGenModule.cpp

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2022-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Currently waiting on https://github.com/emscripten-core/emscripten/pull/17099 to land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75277/new/ https://reviews.llvm.org/D75277

[PATCH] D75277: [WebAssembly] Remove restriction on main name mangling

2022-05-31 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 433138. sbc100 added a comment. Herald added subscribers: llvm-commits, asb, hiraditya. Herald added a project: LLVM. - update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75277/new/

[PATCH] D123763: [randstruct] Enforce using a designated init for a randomized struct

2022-05-02 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. This new test has been failing on the emscripten builders.. seemingly ever since it landed: https://ci.chromium.org/ui/p/emscripten-releases/builders/ci/linux-test-suites/b8815286583388131569/overview It also fails for me locally: ../llvm-build/bin/llvm-lit

[PATCH] D121151: [WebAssembly] Add new target feature in support of 'extended-const' proposal

2022-03-07 Thread Sam Clegg via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc832edfd3fbc: [WebAssembly] Add new target feature in support of extended-const proposal (authored by sbc100). Repository: rG LLVM Github

[PATCH] D121151: [WebAssembly] Add new target feature in support of 'extended-const' proposal

2022-03-07 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Surprising amount of boilerplate here.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121151/new/ https://reviews.llvm.org/D121151 ___ cfe-commits mailing list

[PATCH] D121151: [WebAssembly] Add new target feature in support of 'extended-const' proposal

2022-03-07 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: wingo, dang, ecnelises, sunfish, hiraditya, jgravelle-google, dschuff. Herald added a project: All. sbc100 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, aheejin. Herald added projects: clang, LLVM.

[PATCH] D120251: [clang][driver][wasm] Fix libstdc++ target-dependent include dir

2022-02-22 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D120251#3336981 , @tbaeder wrote: > @sbc100 Do you think we should add `/backward` as well? `Gnu.cpp` does that > it seems: > https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Gnu.cpp#L2959-L2960 I

  1   2   3   4   >