diff --git a/.travis.yml b/.travis.yml
index a1e1890ea8..271b6069b5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,23 +1,16 @@
+os:
+ - linux
+ - osx
dist: trusty
+osx_image: xcode8.3
sudo: required
language: cpp
before_install:
- - sudo sh -c 'echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main" >> /etc/apt/sources.list'
- - wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
- - sudo apt-get update -q
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ci/travis_linux_before_install; fi
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ci/travis_osx_before_install; fi
install:
- - sudo apt-get remove -y llvm-*
- - sudo rm -rf /usr/local/*
- - sudo apt-get install -y clang-4.0 libclang-4.0 libclang-4.0-dev llvm-4.0 llvm-4.0-dev liblld-4.0 liblld-4.0-dev cmake
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ci/travis_linux_install; fi
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ci/travis_osx_install; fi
script:
- - export CC=clang-4.0
- - export CXX=clang++-4.0
- - which $CC
- - which $CXX
- - echo $PATH
- - mkdir build
- - cd build
- - cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd) -DZIG_LIBC_LIB_DIR=$(dirname $($CC -print-file-name=crt1.o)) -DZIG_LIBC_INCLUDE_DIR=$(echo -n | $CC -E -x c - -v 2>&1 | grep -B1 "End of search list." | head -n1 | cut -c 2- | sed "s/ .*//") -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $($CC -print-file-name=crtbegin.o))
- - make VERBOSE=1
- - make install
- - ./zig build --build-file ../build.zig test
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ci/travis_linux_script; fi
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ci/travis_osx_script; fi
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8c862e3de..f942fcd338 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,9 @@ set(ZIG_EACH_LIB_RPATH off CACHE BOOL "Add each dynamic library to rpath for nat
option(ZIG_TEST_COVERAGE "Build Zig with test coverage instrumentation" OFF)
+# To see what patches have been applied to LLD in this repository:
+# git log -p -- deps/lld
+option(ZIG_FORCE_EXTERNAL_LLD "If your system has the LLD patches use it instead of the embedded LLD" OFF)
find_package(llvm)
@@ -31,8 +34,137 @@ link_directories(${LLVM_LIBDIRS})
find_package(clang)
include_directories(${CLANG_INCLUDE_DIRS})
-find_package(lld)
-include_directories(${LLD_INCLUDE_DIRS})
+if(ZIG_FORCE_EXTERNAL_LLD)
+ find_package(lld)
+ include_directories(${LLD_INCLUDE_DIRS})
+else()
+ set(EMBEDDED_LLD_LIB_SOURCES
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Driver/DarwinLdDriver.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Config/Version.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/LayoutPass.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ObjCPass.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/TLVPass.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/GOTPass.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_x86.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ShimPass.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/WriterMachO.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/StubsPass.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/FileArchive.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/TargetOptionsCommandFlags.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/File.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Error.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/SymbolTable.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Reader.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Reproduce.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Writer.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/LinkingContext.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Resolver.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/DefinedAtom.cpp"
+ )
+ set(EMBEDDED_LLD_ELF_SOURCES
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/ScriptLexer.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/AMDGPU.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/PPC.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/ARM.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/AVR.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/SPARCV9.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/Mips.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/AArch64.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/X86_64.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/PPC64.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/MipsArchTree.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/X86.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/GdbIndex.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Driver.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Relocations.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Error.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/LTO.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Strings.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/ScriptParser.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/MarkLive.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/SyntheticSections.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/SymbolTable.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/LinkerScript.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/EhFrame.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Target.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Filesystem.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/OutputSections.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Symbols.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/ICF.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/InputFiles.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Thunks.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/DriverUtils.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Writer.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/InputSection.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF/MapFile.cpp"
+ )
+ set(EMBEDDED_LLD_COFF_SOURCES
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/DLL.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Driver.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Chunks.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/PDB.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Error.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/LTO.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Strings.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/MarkLive.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/SymbolTable.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Symbols.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/ICF.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/InputFiles.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/DriverUtils.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Writer.cpp"
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF/MapFile.cpp"
+ )
+ add_library(embedded_lld_lib ${EMBEDDED_LLD_LIB_SOURCES})
+ add_library(embedded_lld_elf ${EMBEDDED_LLD_ELF_SOURCES})
+ add_library(embedded_lld_coff ${EMBEDDED_LLD_COFF_SOURCES})
+ set_target_properties(embedded_lld_lib PROPERTIES
+ COMPILE_FLAGS "-std=c++11 -fno-exceptions -fno-rtti -Wno-comment"
+ LINK_FLAGS " "
+ )
+ set_target_properties(embedded_lld_elf PROPERTIES
+ COMPILE_FLAGS "-std=c++11 -fno-exceptions -fno-rtti -Wno-comment"
+ LINK_FLAGS " "
+ )
+ set_target_properties(embedded_lld_coff PROPERTIES
+ COMPILE_FLAGS "-std=c++11 -fno-exceptions -fno-rtti -Wno-comment"
+ LINK_FLAGS " "
+ )
+ target_include_directories(embedded_lld_lib PUBLIC
+ "${CMAKE_SOURCE_DIR}/deps/lld/include"
+ "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt"
+ )
+ target_include_directories(embedded_lld_elf PUBLIC
+ "${CMAKE_SOURCE_DIR}/deps/lld/ELF"
+ "${CMAKE_SOURCE_DIR}/deps/lld/include"
+ "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt/ELF"
+ "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt"
+ )
+ target_include_directories(embedded_lld_coff PUBLIC
+ "${CMAKE_SOURCE_DIR}/deps/lld/COFF"
+ "${CMAKE_SOURCE_DIR}/deps/lld/include"
+ "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt/COFF"
+ "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt"
+ )
+ set(LLD_INCLUDE_DIRS "")
+ set(LLD_LIBRARIES
+ embedded_lld_elf
+ embedded_lld_coff
+ embedded_lld_lib
+ )
+endif()
find_package(Threads)
@@ -65,26 +197,6 @@ set(ZIG_SOURCES
"${CMAKE_SOURCE_DIR}/src/zig_llvm.cpp"
)
-set(ZIG_HOST_LINK_VERSION)
-if (APPLE)
- set(LD_V_OUTPUT)
- execute_process(
- COMMAND sh -c "${CMAKE_LINKER} -v 2>&1 | head -1"
- RESULT_VARIABLE HAD_ERROR
- OUTPUT_VARIABLE LD_V_OUTPUT
- )
- if (NOT HAD_ERROR)
- if ("${LD_V_OUTPUT}" MATCHES ".*ld64-([0-9.]+).*")
- string(REGEX REPLACE ".*ld64-([0-9.]+).*" "\\1" ZIG_HOST_LINK_VERSION ${LD_V_OUTPUT})
- elseif ("${LD_V_OUTPUT}" MATCHES "[^0-9]*([0-9.]+).*")
- string(REGEX REPLACE "[^0-9]*([0-9.]+).*" "\\1" ZIG_HOST_LINK_VERSION ${LD_V_OUTPUT})
- endif()
- else()
- message(FATAL_ERROR "${CMAKE_LINKER} failed with status ${HAD_ERROR}")
- endif()
-endif()
-
-
set(C_HEADERS_DEST "lib/zig/include")
set(ZIG_STD_DEST "lib/zig/std")
set(CONFIGURE_OUT_FILE "${CMAKE_BINARY_DIR}/config.h")
@@ -297,10 +409,10 @@ install(FILES "${CMAKE_SOURCE_DIR}/std/mem.zig" DESTINATION "${ZIG_STD_DEST}")
install(FILES "${CMAKE_SOURCE_DIR}/std/net.zig" DESTINATION "${ZIG_STD_DEST}")
install(FILES "${CMAKE_SOURCE_DIR}/std/os/child_process.zig" DESTINATION "${ZIG_STD_DEST}/os")
install(FILES "${CMAKE_SOURCE_DIR}/std/os/darwin.zig" DESTINATION "${ZIG_STD_DEST}/os")
-install(FILES "${CMAKE_SOURCE_DIR}/std/os/darwin_x86_64.zig" DESTINATION "${ZIG_STD_DEST}/os")
-install(FILES "${CMAKE_SOURCE_DIR}/std/os/errno.zig" DESTINATION "${ZIG_STD_DEST}/os")
+install(FILES "${CMAKE_SOURCE_DIR}/std/os/darwin_errno.zig" DESTINATION "${ZIG_STD_DEST}/os")
install(FILES "${CMAKE_SOURCE_DIR}/std/os/index.zig" DESTINATION "${ZIG_STD_DEST}/os")
install(FILES "${CMAKE_SOURCE_DIR}/std/os/linux.zig" DESTINATION "${ZIG_STD_DEST}/os")
+install(FILES "${CMAKE_SOURCE_DIR}/std/os/linux_errno.zig" DESTINATION "${ZIG_STD_DEST}/os")
install(FILES "${CMAKE_SOURCE_DIR}/std/os/linux_i386.zig" DESTINATION "${ZIG_STD_DEST}/os")
install(FILES "${CMAKE_SOURCE_DIR}/std/os/linux_x86_64.zig" DESTINATION "${ZIG_STD_DEST}/os")
install(FILES "${CMAKE_SOURCE_DIR}/std/os/path.zig" DESTINATION "${ZIG_STD_DEST}/os")
diff --git a/README.md b/README.md
index da8854e9c0..036cac1ee8 100644
--- a/README.md
+++ b/README.md
@@ -76,7 +76,7 @@ the Zig compiler itself:
These libraries must be installed on your system, with the development files
available. The Zig compiler links against them.
- * LLVM, Clang, and LLD libraries == 4.x
+ * LLVM, Clang, and LLD libraries == 5.x
### Debug / Development Build
diff --git a/ci/travis_linux_before_install b/ci/travis_linux_before_install
new file mode 100755
index 0000000000..05495ccdf1
--- /dev/null
+++ b/ci/travis_linux_before_install
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -x
+
+sudo sh -c 'echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main" >> /etc/apt/sources.list'
+wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
+sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
+sudo apt-get update -q
diff --git a/ci/travis_linux_install b/ci/travis_linux_install
new file mode 100755
index 0000000000..1613487f8b
--- /dev/null
+++ b/ci/travis_linux_install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -x
+
+sudo apt-get remove -y llvm-*
+sudo rm -rf /usr/local/*
+sudo apt-get install -y clang-5.0 libclang-5.0 libclang-5.0-dev llvm-5.0 llvm-5.0-dev liblld-5.0 liblld-5.0-dev cmake
diff --git a/ci/travis_linux_script b/ci/travis_linux_script
new file mode 100755
index 0000000000..7e37d44ce6
--- /dev/null
+++ b/ci/travis_linux_script
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -x
+
+export CC=clang-5.0
+export CXX=clang++-5.0
+which $CC
+which $CXX
+echo $PATH
+mkdir build
+cd build
+cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd) -DZIG_LIBC_LIB_DIR=$(dirname $($CC -print-file-name=crt1.o)) -DZIG_LIBC_INCLUDE_DIR=$(echo -n | $CC -E -x c - -v 2>&1 | grep -B1 "End of search list." | head -n1 | cut -c 2- | sed "s/ .*//") -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $($CC -print-file-name=crtbegin.o)) -DZIG_FORCE_EXTERNAL_LLD=ON
+make VERBOSE=1
+make install
+./zig build --build-file ../build.zig test
diff --git a/ci/travis_osx_before_install b/ci/travis_osx_before_install
new file mode 100755
index 0000000000..dba0d46734
--- /dev/null
+++ b/ci/travis_osx_before_install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -x
+
+brew update
diff --git a/ci/travis_osx_install b/ci/travis_osx_install
new file mode 100755
index 0000000000..bdd4de320e
--- /dev/null
+++ b/ci/travis_osx_install
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -x
+
+brew install gcc@7
+brew outdated gcc@7 || brew upgrade gcc@7
+brew link --overwrite gcc@7
+
+SRC_DIR=$(pwd)
+PREFIX_DIR=$HOME/local/llvm5
+export CC=/usr/local/opt/gcc/bin/gcc-7
+export CXX=/usr/local/opt/gcc/bin/g++-7
+
+mkdir -p $HOME/local
+cd $HOME/local
+wget http://s3.amazonaws.com/superjoe/temp/llvm5.tar.xz
+tar xfp llvm5.tar.xz
+
+cd $SRC_DIR
diff --git a/ci/travis_osx_script b/ci/travis_osx_script
new file mode 100755
index 0000000000..42b4868a6f
--- /dev/null
+++ b/ci/travis_osx_script
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -x
+
+PREFIX_DIR=$HOME/local/llvm5
+export CC=/usr/local/opt/gcc/bin/gcc-7
+export CXX=/usr/local/opt/gcc/bin/g++-7
+
+echo $PATH
+mkdir build
+cd build
+cmake .. -DCMAKE_PREFIX_PATH=$PREFIX_DIR -DCMAKE_INSTALL_PREFIX=$(pwd) -DZIG_LIBC_LIB_DIR=$(dirname $($CC -print-file-name=crt1.o)) -DZIG_LIBC_INCLUDE_DIR=$(echo -n | $CC -E -x c - -v 2>&1 | grep -B1 "End of search list." | head -n1 | cut -c 2- | sed "s/ .*//") -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $($CC -print-file-name=crtbegin.o)) -DZIG_FORCE_EXTERNAL_LLD=ON
+make VERBOSE=1
+make install
+./zig build --build-file ../build.zig test
diff --git a/cmake/Findclang.cmake b/cmake/Findclang.cmake
index 77c2b5bb12..5acd8de060 100644
--- a/cmake/Findclang.cmake
+++ b/cmake/Findclang.cmake
@@ -8,14 +8,14 @@
find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
PATHS
- /usr/lib/llvm-4.0/include
+ /usr/lib/llvm-5.0/include
/mingw64/include)
macro(FIND_AND_ADD_CLANG_LIB _libname_)
string(TOUPPER ${_libname_} _prettylibname_)
find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
PATHS
- /usr/lib/llvm-4.0/lib
+ /usr/lib/llvm-5.0/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:\\msys64\\mingw64\\lib)
diff --git a/cmake/Findlld.cmake b/cmake/Findlld.cmake
index d20ffed6f2..911bb876b9 100644
--- a/cmake/Findlld.cmake
+++ b/cmake/Findlld.cmake
@@ -8,10 +8,10 @@
find_path(LLD_INCLUDE_DIRS NAMES lld/Driver/Driver.h
PATHS
- /usr/lib/llvm-4.0/include
+ /usr/lib/llvm-5.0/include
/mingw64/include)
-find_library(LLD_LIBRARY NAMES lld-4.0 lld PATHS /usr/lib/llvm-4.0/lib)
+find_library(LLD_LIBRARY NAMES lld-5.0 lld PATHS /usr/lib/llvm-5.0/lib)
if(EXISTS ${LLD_LIBRARY})
set(LLD_LIBRARIES ${LLD_LIBRARY})
else()
@@ -19,7 +19,7 @@ else()
string(TOUPPER ${_libname_} _prettylibname_)
find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_}
PATHS
- /usr/lib/llvm-4.0/lib
+ /usr/lib/llvm-5.0/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:/msys64/mingw64/lib)
diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake
index 29dd0fda1a..4708576e9e 100644
--- a/cmake/Findllvm.cmake
+++ b/cmake/Findllvm.cmake
@@ -8,12 +8,12 @@
# LLVM_LIBDIRS
find_program(LLVM_CONFIG_EXE
- NAMES llvm-config llvm-config-4.0
+ NAMES llvm-config llvm-config-5.0
PATHS
"/mingw64/bin"
"/c/msys64/mingw64/bin"
"c:/msys64/mingw64/bin"
- "C:/Libraries/llvm-4.0.0/bin")
+ "C:/Libraries/llvm-5.0.0/bin")
execute_process(
COMMAND ${LLVM_CONFIG_EXE} --libs
diff --git a/deps/lld-prebuilt/COFF/Options.inc b/deps/lld-prebuilt/COFF/Options.inc
new file mode 100644
index 0000000000..a2a0f3f892
--- /dev/null
+++ b/deps/lld-prebuilt/COFF/Options.inc
@@ -0,0 +1,174 @@
+/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
+|* *|
+|* Option Parsing Definitions *|
+|* *|
+|* Automatically generated file, do not edit! *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+/////////
+// Prefixes
+
+#ifdef PREFIX
+#define COMMA ,
+PREFIX(prefix_0, {nullptr})
+PREFIX(prefix_2, {"/" COMMA "-" COMMA nullptr})
+PREFIX(prefix_1, {"/" COMMA "-" COMMA "-?" COMMA nullptr})
+PREFIX(prefix_3, {"/?" COMMA "-?" COMMA nullptr})
+#undef COMMA
+#endif // PREFIX
+
+/////////
+// Groups
+
+#ifdef OPTION
+
+//////////
+// Options
+
+OPTION(prefix_0, "", INPUT, Input, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_0, "", UNKNOWN, Unknown, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "align:", align, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Section alignment", nullptr, nullptr)
+OPTION(prefix_1, "allowbind:no", allowbind_no, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Disable DLL binding", nullptr, nullptr)
+OPTION(prefix_1, "allowbind", allowbind, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "allowisolation:no", allowisolation_no, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Set NO_ISOLATION bit", nullptr, nullptr)
+OPTION(prefix_1, "allowisolation", allowisolation, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "alternatename:", alternatename, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Define weak alias", nullptr, nullptr)
+OPTION(prefix_1, "appcontainer:no", appcontainer_no, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Image can only be run in an app container", nullptr, nullptr)
+OPTION(prefix_1, "appcontainer", appcontainer, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "base:", base, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Base address of the program", nullptr, nullptr)
+OPTION(prefix_1, "debugtype:", debugtype, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Debug Info Options", nullptr, nullptr)
+OPTION(prefix_1, "debug", debug, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Embed a symbol table in the image", nullptr, nullptr)
+OPTION(prefix_2, "def:", deffile, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Use module-definition file", nullptr, nullptr)
+OPTION(prefix_1, "defaultlib:", defaultlib, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Add the library to the list of input files", nullptr, nullptr)
+OPTION(prefix_1, "delay:", delay, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "delayload:", delayload, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Delay loaded DLL name", nullptr, nullptr)
+OPTION(prefix_1, "disallowlib:", disallowlib, Joined, INVALID, nodefaultlib, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "dll", dll, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Create a DLL", nullptr, nullptr)
+OPTION(prefix_1, "driver:", driver, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Generate a Windows NT Kernel Mode Driver", nullptr, nullptr)
+OPTION(prefix_1, "dynamicbase:no", dynamicbase_no, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Disable address space layout randomization", nullptr, nullptr)
+OPTION(prefix_1, "dynamicbase", dynamicbase, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "editandcontinue", editandcontinue, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "entry:", entry, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Name of entry point symbol", nullptr, nullptr)
+OPTION(prefix_1, "errorlimit:", errorlimit, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Maximum number of errors to emit before stopping (0 = no limit)", nullptr, nullptr)
+OPTION(prefix_1, "errorreport:", errorreport, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "export:", export, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Export a function", nullptr, nullptr)
+OPTION(prefix_1, "failifmismatch:", failifmismatch, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "", nullptr, nullptr)
+OPTION(prefix_1, "fastfail", fastfail, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "fixed:no", fixed_no, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Enable base relocations", nullptr, nullptr)
+OPTION(prefix_1, "fixed", fixed, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "force:unresolved", force_unresolved, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "force", force, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Allow undefined symbols when creating executables", nullptr, nullptr)
+OPTION(prefix_1, "functionpadmin", functionpadmin, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "guardsym:", guardsym, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "heap:", heap, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Size of the heap", nullptr, nullptr)
+OPTION(prefix_1, "help", help, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "highentropyva:no", highentropyva_no, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Set HIGH_ENTROPY_VA bit", nullptr, nullptr)
+OPTION(prefix_1, "highentropyva", highentropyva, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "idlout:", idlout, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "ignore:", ignore, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "ignoreidl", ignoreidl, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "implib:", implib, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Import library name", nullptr, nullptr)
+OPTION(prefix_2, "include:", incl, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Force symbol to be added to symbol table as undefined one", nullptr, nullptr)
+OPTION(prefix_1, "incremental:no", no_incremental, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "incremental", incremental, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "largeaddressaware:no", largeaddressaware_no, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Disable large addresses", nullptr, nullptr)
+OPTION(prefix_1, "largeaddressaware", largeaddressaware, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "libpath:", libpath, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Additional library search path", nullptr, nullptr)
+OPTION(prefix_1, "linkrepro:", linkrepro, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Dump linker invocation and input files for debugging", nullptr, nullptr)
+OPTION(prefix_2, "lldmap:", lldmap_file, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "lldmap", lldmap, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "lldsavetemps", lldsavetemps, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Save temporary files instead of deleting them", nullptr, nullptr)
+OPTION(prefix_1, "machine:", machine, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Specify target platform", nullptr, nullptr)
+OPTION(prefix_1, "manifest:", manifest_colon, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Create manifest file", nullptr, nullptr)
+OPTION(prefix_1, "manifestdependency:", manifestdependency, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Attributes for in manifest file", nullptr, nullptr)
+OPTION(prefix_1, "manifestfile:", manifestfile, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Manifest file path", nullptr, nullptr)
+OPTION(prefix_1, "manifestinput:", manifestinput, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Specify manifest file", nullptr, nullptr)
+OPTION(prefix_1, "manifestuac:", manifestuac, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "User access control", nullptr, nullptr)
+OPTION(prefix_1, "manifest", manifest, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "maxilksize:", maxilksize, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "merge:", merge, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Combine sections", nullptr, nullptr)
+OPTION(prefix_1, "mllvm:", mllvm, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Options to pass to LLVM", nullptr, nullptr)
+OPTION(prefix_1, "msvclto", msvclto, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "nodefaultlib:", nodefaultlib, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Remove a default library", nullptr, nullptr)
+OPTION(prefix_1, "nodefaultlib", nodefaultlib_all, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "noentry", noentry, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "nologo", nologo, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "nopdb", nopdb, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Disable PDB generation for DWARF users", nullptr, nullptr)
+OPTION(prefix_1, "nosymtab", nosymtab, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "nxcompat:no", nxcompat_no, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Disable data execution provention", nullptr, nullptr)
+OPTION(prefix_1, "nxcompat", nxcompat, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "opt:", opt, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Control optimizations", nullptr, nullptr)
+OPTION(prefix_1, "out:", out, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Path to file to write output", nullptr, nullptr)
+OPTION(prefix_1, "pdb:", pdb, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "PDB file path", nullptr, nullptr)
+OPTION(prefix_1, "pdbaltpath:", pdbaltpath, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "profile", profile, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "safeseh:no", safeseh_no, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Produce an image with Safe Exception Handler", nullptr, nullptr)
+OPTION(prefix_1, "safeseh", safeseh, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "section:", section, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Specify section attributes", nullptr, nullptr)
+OPTION(prefix_1, "stack:", stack, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Size of the stack", nullptr, nullptr)
+OPTION(prefix_1, "stub:", stub, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Specify DOS stub file", nullptr, nullptr)
+OPTION(prefix_1, "subsystem:", subsystem, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Specify subsystem", nullptr, nullptr)
+OPTION(prefix_1, "swaprun:cd", swaprun_cd, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "swaprun:net", swaprun_net, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "throwingnew", throwingnew, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "tlbid:", tlbid, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "tlbout:", tlbout, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "tsaware:no", tsaware_no, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Create non-Terminal Server aware executable", nullptr, nullptr)
+OPTION(prefix_1, "tsaware", tsaware, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "verbose:", verbose_all, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "verbose", verbose, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "version:", version, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Specify a version number in the PE header", nullptr, nullptr)
+OPTION(prefix_1, "wx:no", wx_no, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "wx", wx, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_3, "", help_q, Flag, INVALID, help, nullptr, 0, 0, nullptr, nullptr, nullptr)
+#endif // OPTION
diff --git a/deps/lld-prebuilt/DarwinLdOptions.inc b/deps/lld-prebuilt/DarwinLdOptions.inc
new file mode 100644
index 0000000000..c70eb2967c
--- /dev/null
+++ b/deps/lld-prebuilt/DarwinLdOptions.inc
@@ -0,0 +1,189 @@
+/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
+|* *|
+|* Option Parsing Definitions *|
+|* *|
+|* Automatically generated file, do not edit! *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+/////////
+// Prefixes
+
+#ifdef PREFIX
+#define COMMA ,
+PREFIX(prefix_0, {nullptr})
+PREFIX(prefix_1, {"-" COMMA nullptr})
+#undef COMMA
+#endif // PREFIX
+
+/////////
+// Groups
+
+#ifdef OPTION
+OPTION(nullptr, "opts", grp_bundle, Group, INVALID, INVALID, nullptr, 0, 0,
+ "BUNDLE EXECUTABLE OPTIONS", nullptr, nullptr)
+OPTION(nullptr, "opts", grp_dylib, Group, INVALID, INVALID, nullptr, 0, 0,
+ "DYLIB EXECUTABLE OPTIONS", nullptr, nullptr)
+OPTION(nullptr, "outs", grp_kind, Group, INVALID, INVALID, nullptr, 0, 0,
+ "OUTPUT KIND", nullptr, nullptr)
+OPTION(nullptr, "libs", grp_libs, Group, INVALID, INVALID, nullptr, 0, 0,
+ "LIBRARY OPTIONS", nullptr, nullptr)
+OPTION(nullptr, "opts", grp_main, Group, INVALID, INVALID, nullptr, 0, 0,
+ "MAIN EXECUTABLE OPTIONS", nullptr, nullptr)
+OPTION(nullptr, "obsolete", grp_obsolete, Group, INVALID, INVALID, nullptr, 0, 0,
+ "OBSOLETE OPTIONS", nullptr, nullptr)
+OPTION(nullptr, "opts", grp_opts, Group, INVALID, INVALID, nullptr, 0, 0,
+ "OPTIMIZATIONS", nullptr, nullptr)
+
+//////////
+// Options
+
+OPTION(prefix_0, "", INPUT, Input, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_0, "", UNKNOWN, Unknown, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "all_load", all_load, Flag, grp_libs, INVALID, nullptr, 0, 0,
+ "Forces all members of all static libraries to be loaded", nullptr, nullptr)
+OPTION(prefix_1, "arch", arch, Separate, INVALID, INVALID, nullptr, 0, 0,
+ "Architecture to link", "", nullptr)
+OPTION(prefix_1, "bundle_loader", bundle_loader, Separate, grp_bundle, INVALID, nullptr, 0, 0,
+ "The executable that will be loading this Mach-O bundle", "", nullptr)
+OPTION(prefix_1, "bundle", bundle, Flag, grp_kind, INVALID, nullptr, 0, 0,
+ "Create dynamic bundle", nullptr, nullptr)
+OPTION(prefix_1, "compatibility_version", compatibility_version, Separate, grp_dylib, INVALID, nullptr, 0, 0,
+ "The dylib's compatibility version", "", nullptr)
+OPTION(prefix_1, "current_version", current_version, Separate, grp_dylib, INVALID, nullptr, 0, 0,
+ "The dylib's current version", "", nullptr)
+OPTION(prefix_1, "data_in_code_info", data_in_code_info, Flag, grp_opts, INVALID, nullptr, 0, 0,
+ "Force generation of a data in code load command", nullptr, nullptr)
+OPTION(prefix_1, "dead_strip", dead_strip, Flag, grp_opts, INVALID, nullptr, 0, 0,
+ "Remove unreference code and data", nullptr, nullptr)
+OPTION(prefix_1, "demangle", demangle, Flag, INVALID, INVALID, nullptr, 0, 0,
+ "Demangles symbol names in errors and warnings", nullptr, nullptr)
+OPTION(prefix_1, "dependency_info", dependency_info, Separate, INVALID, INVALID, nullptr, 0, 0,
+ "Write binary list of files used during link", "", nullptr)
+OPTION(prefix_1, "dylib_compatibility_version", dylib_compatibility_version, Separate, INVALID, compatibility_version, nullptr, 0, 0, nullptr, "", nullptr)
+OPTION(prefix_1, "dylib_current_version", dylib_current_version, Separate, INVALID, current_version, nullptr, 0, 0, nullptr, "", nullptr)
+OPTION(prefix_1, "dylib_install_name", dylib_install_name, Separate, INVALID, install_name, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "dylib", dylib, Flag, grp_kind, INVALID, nullptr, 0, 0,
+ "Create dynamic library", nullptr, nullptr)
+OPTION(prefix_1, "dynamic", dynamic, Flag, grp_kind, INVALID, nullptr, 0, 0,
+ "Create dynamic executable (default)", nullptr, nullptr)
+OPTION(prefix_1, "execute", execute, Flag, grp_kind, INVALID, nullptr, 0, 0,
+ "Create main executable (default)", nullptr, nullptr)
+OPTION(prefix_1, "export_dynamic", export_dynamic, Flag, grp_main, INVALID, nullptr, 0, 0,
+ "Preserves all global symbols in main executables during LTO", nullptr, nullptr)
+OPTION(prefix_1, "exported_symbols_list", exported_symbols_list, Separate, grp_opts, INVALID, nullptr, 0, 0,
+ "Restricts which symbols will be exported", "", nullptr)
+OPTION(prefix_1, "exported_symbol", exported_symbol, Separate, grp_opts, INVALID, nullptr, 0, 0,
+ "Restricts which symbols will be exported", "", nullptr)
+OPTION(prefix_1, "e", entry, Separate, grp_main, INVALID, nullptr, 0, 0,
+ "entry symbol name", "", nullptr)
+OPTION(prefix_1, "filelist", filelist, Separate, INVALID, INVALID, nullptr, 0, 0,
+ "file containing paths to input files", "", nullptr)
+OPTION(prefix_1, "flat_namespace", flat_namespace, Flag, grp_opts, INVALID, nullptr, 0, 0,
+ "Resolves symbols in any (transitively) linked dynamic libraries. Source libraries are not recorded: dyld will re-search all images at runtime and use the first definition found.", nullptr, nullptr)
+OPTION(prefix_1, "force_load", force_load, Separate, grp_libs, INVALID, nullptr, 0, 0,
+ "Forces all members of specified static libraries to be loaded", "", nullptr)
+OPTION(prefix_1, "framework", framework, Separate, INVALID, INVALID, nullptr, 0, 0,
+ "Base name of framework searched for in -F directories", "", nullptr)
+OPTION(prefix_1, "function_starts", function_starts, Flag, grp_opts, INVALID, nullptr, 0, 0,
+ "Force generation of a function starts load command", nullptr, nullptr)
+OPTION(prefix_1, "F", F, JoinedOrSeparate, grp_libs, INVALID, nullptr, 0, 0,
+ "Add directory to framework search path", "", nullptr)
+OPTION(prefix_1, "image_base", image_base, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "install_name", install_name, Separate, grp_dylib, INVALID, nullptr, 0, 0,
+ "The dylib's install name", "", nullptr)
+OPTION(prefix_1, "ios_simulator_version_min", ios_simulator_version_min, Separate, grp_opts, INVALID, nullptr, 0, 0,
+ "Minimum iOS simulator version", "", nullptr)
+OPTION(prefix_1, "ios_version_min", ios_version_min, Separate, grp_opts, INVALID, nullptr, 0, 0,
+ "Minimum iOS version", "", nullptr)
+OPTION(prefix_1, "iphoneos_version_min", iphoneos_version_min, Separate, INVALID, ios_version_min, nullptr, 0, 0, nullptr, nullptr, nullptr)
+OPTION(prefix_1, "keep_private_externs", keep_private_externs, Flag, grp_opts, INVALID, nullptr, 0, 0,
+ "Private extern (hidden) symbols should not be transformed into local symbols", nullptr, nullptr)
+OPTION(prefix_1, "L", L, JoinedOrSeparate, grp_libs, INVALID, nullptr, 0, 0,
+ "Add directory to library search path", "", nullptr)
+OPTION(prefix_1, "l", l, Joined, INVALID, INVALID, nullptr, 0, 0,
+ "Base name of library searched for in -L directories", "", nullptr)
+OPTION(prefix_1, "macosx_version_min", macosx_version_min, Separate, grp_opts, INVALID, nullptr, 0, 0,
+ "Minimum Mac OS X version", "", nullptr)
+OPTION(prefix_1, "mark_dead_strippable_dylib", mark_dead_strippable_dylib, Flag, grp_dylib, INVALID, nullptr, 0, 0,
+ "Marks the dylib as having no side effects during initialization", nullptr, nullptr)
+OPTION(prefix_1, "mllvm", mllvm, Separate, grp_opts, INVALID, nullptr, 0, 0,
+ "Options to pass to LLVM during LTO", "