remove remnants of depending on darwin system linker

This commit is contained in:
Andrew Kelley 2017-08-28 03:31:57 -04:00
parent e6b7b8a070
commit 6c7e975b75
6 changed files with 0 additions and 36 deletions

View File

@ -197,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")

View File

@ -1465,7 +1465,6 @@ struct CodeGen {
bool windows_subsystem_windows;
bool windows_subsystem_console;
bool windows_linker_unicode;
Buf *darwin_linker_version;
Buf *mmacosx_version_min;
Buf *mios_version_min;
bool linker_rdynamic;

View File

@ -108,7 +108,6 @@ CodeGen *codegen_create(Buf *root_src_path, const ZigTarget *target, OutType out
g->libc_lib_dir = buf_create_from_str("");
g->libc_static_lib_dir = buf_create_from_str("");
g->libc_include_dir = buf_create_from_str("");
g->darwin_linker_version = buf_create_from_str("");
g->each_lib_rpath = false;
} else {
// native compilation, we can rely on the configuration stuff
@ -119,7 +118,6 @@ CodeGen *codegen_create(Buf *root_src_path, const ZigTarget *target, OutType out
g->libc_lib_dir = buf_create_from_str(ZIG_LIBC_LIB_DIR);
g->libc_static_lib_dir = buf_create_from_str(ZIG_LIBC_STATIC_LIB_DIR);
g->libc_include_dir = buf_create_from_str(ZIG_LIBC_INCLUDE_DIR);
g->darwin_linker_version = buf_create_from_str(ZIG_HOST_LINK_VERSION);
#ifdef ZIG_EACH_LIB_RPATH
g->each_lib_rpath = true;
#endif
@ -251,10 +249,6 @@ void codegen_set_windows_unicode(CodeGen *g, bool municode) {
g->windows_linker_unicode = municode;
}
void codegen_set_mlinker_version(CodeGen *g, Buf *darwin_linker_version) {
g->darwin_linker_version = darwin_linker_version;
}
void codegen_set_mmacosx_version_min(CodeGen *g, Buf *mmacosx_version_min) {
g->mmacosx_version_min = mmacosx_version_min;
}

View File

@ -36,7 +36,6 @@ void codegen_add_lib_dir(CodeGen *codegen, const char *dir);
LinkLib *codegen_add_link_lib(CodeGen *codegen, Buf *lib);
void codegen_add_framework(CodeGen *codegen, const char *name);
void codegen_add_rpath(CodeGen *codegen, const char *name);
void codegen_set_mlinker_version(CodeGen *g, Buf *darwin_linker_version);
void codegen_set_rdynamic(CodeGen *g, bool rdynamic);
void codegen_set_mmacosx_version_min(CodeGen *g, Buf *mmacosx_version_min);
void codegen_set_mios_version_min(CodeGen *g, Buf *mios_version_min);

View File

@ -19,7 +19,6 @@
#define ZIG_LIBC_LIB_DIR "@ZIG_LIBC_LIB_DIR@"
#define ZIG_LIBC_STATIC_LIB_DIR "@ZIG_LIBC_STATIC_LIB_DIR@"
#define ZIG_DYNAMIC_LINKER "@ZIG_DYNAMIC_LINKER@"
#define ZIG_HOST_LINK_VERSION "@ZIG_HOST_LINK_VERSION@"
#cmakedefine ZIG_EACH_LIB_RPATH
#cmakedefine ZIG_LLVM_OLD_CXX_ABI

View File

@ -68,7 +68,6 @@ static int usage(const char *arg0) {
" -municode (windows) link with unicode\n"
" -framework [name] (darwin) link against framework\n"
" -mios-version-min [ver] (darwin) set iOS deployment target\n"
" -mlinker-version [ver] (darwin) override linker version\n"
" -mmacosx-version-min [ver] (darwin) set Mac OS X deployment target\n"
" --ver-major [ver] dynamic library semver major version\n"
" --ver-minor [ver] dynamic library semver minor version\n"
@ -199,7 +198,6 @@ int main(int argc, char **argv) {
bool mwindows = false;
bool mconsole = false;
bool municode = false;
const char *mlinker_version = nullptr;
bool rdynamic = false;
const char *mmacosx_version_min = nullptr;
const char *mios_version_min = nullptr;
@ -433,8 +431,6 @@ int main(int argc, char **argv) {
target_os = argv[i];
} else if (strcmp(arg, "--target-environ") == 0) {
target_environ = argv[i];
} else if (strcmp(arg, "-mlinker-version") == 0) {
mlinker_version = argv[i];
} else if (strcmp(arg, "-mmacosx-version-min") == 0) {
mmacosx_version_min = argv[i];
} else if (strcmp(arg, "-mios-version-min") == 0) {
@ -632,9 +628,6 @@ int main(int argc, char **argv) {
codegen_set_windows_subsystem(g, mwindows, mconsole);
codegen_set_windows_unicode(g, municode);
codegen_set_rdynamic(g, rdynamic);
if (mlinker_version) {
codegen_set_mlinker_version(g, buf_create_from_str(mlinker_version));
}
if (mmacosx_version_min && mios_version_min) {
fprintf(stderr, "-mmacosx-version-min and -mios-version-min options not allowed together\n");
return EXIT_FAILURE;