[PATCH] D40725: Wasm entrypoint changes #3 (add --no-entry argument to LLD) APPLY AFTER D40559

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 11:25:20 PST 2017


sbc100 added inline comments.


================
Comment at: test/wasm/data-layout.ll:3
 ; RUN: llc -filetype=obj %s -o %t.o
-; RUN: lld -flavor wasm --emit-relocs --allow-undefined --entry '' -o %t.wasm %t.o %t.hello.o
+; RUN: lld -flavor wasm --emit-relocs --allow-undefined --no-entry -o %t.wasm %t.o %t.hello.o
 ; RUN: obj2yaml %t.wasm | FileCheck %s
----------------
Looks like this is not based off of master.  Can you rebase?


================
Comment at: wasm/Driver.cpp:226
+    return def;
+  // Apparently the empty string is a valid symbol name in Wasm, so we use a
+  // null string to mean "no entrypoint", *not* the empty string.
----------------
Empty string is not a valid symbol name.   Do you have some reason to believe it is?


================
Comment at: wasm/Driver.cpp:291
 
-  if (Config->Relocatable && !Config->Entry.empty())
+  if (Config->Relocatable && Config->Entry.data())
     error("entry point specified for relocatable output file");
----------------
I don't think you need to change this.  Treating empty as not present seems fine to me.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D40725





More information about the llvm-commits mailing list