================
@@ -9,20 +9,141 @@
 #include "Haiku.h"
 #include "CommonArgs.h"
 #include "clang/Config/config.h"
+#include "clang/Driver/Compilation.h"
 #include "llvm/Support/Path.h"
 
 using namespace clang::driver;
+using namespace clang::driver::tools;
 using namespace clang::driver::toolchains;
 using namespace clang;
 using namespace llvm::opt;
 
+void haiku::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+                                   const InputInfo &Output,
+                                   const InputInfoList &Inputs,
+                                   const ArgList &Args,
+                                   const char *LinkingOutput) const {
+  const toolchains::Haiku &ToolChain =
+      static_cast<const toolchains::Haiku &>(getToolChain());
+  const Driver &D = ToolChain.getDriver();
+  const llvm::Triple::ArchType Arch = ToolChain.getArch();
+  const bool Static = Args.hasArg(options::OPT_static);
----------------
X547 wrote:

Haiku do not support fully statically linked executables like in Linux for 
reasons similar to Windows. Haiku do not have stable syscall interface, so 
applications must dynamically link to system libc (`libroot.so`), otherwise it 
may break after minor system update when some new syscall will be added or 
arguments will be changed. The same with GUI toolkit libraries. Protocol 
between application and GUI server is private and unstable, the only stable 
interface is dynamic library symbols.

Maybe static flag cab be used for 3rd-party libraries, but I am not sure.

https://github.com/llvm/llvm-project/pull/66038
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to