Lines 34-40
Link Here
|
34 |
#include <spawn.h> |
34 |
#include <spawn.h> |
35 |
#include <cxxabi.h> |
35 |
#include <cxxabi.h> |
36 |
#include <Availability.h> |
36 |
#include <Availability.h> |
|
|
37 |
#ifdef TAPI |
37 |
#include <tapi/tapi.h> |
38 |
#include <tapi/tapi.h> |
|
|
39 |
#endif |
38 |
|
40 |
|
39 |
#include <vector> |
41 |
#include <vector> |
40 |
#include <map> |
42 |
#include <map> |
Lines 937-942
Link Here
|
937 |
bool Options::findFile(const std::string &path, const std::vector<std::string> &tbdExtensions, FileInfo& result) const |
939 |
bool Options::findFile(const std::string &path, const std::vector<std::string> &tbdExtensions, FileInfo& result) const |
938 |
{ |
940 |
{ |
939 |
FileInfo tbdInfo; |
941 |
FileInfo tbdInfo; |
|
|
942 |
#ifdef TAPI |
940 |
for ( const auto &ext : tbdExtensions ) { |
943 |
for ( const auto &ext : tbdExtensions ) { |
941 |
auto newPath = replace_extension(path, ext); |
944 |
auto newPath = replace_extension(path, ext); |
942 |
bool found = tbdInfo.checkFileExists(*this, newPath.c_str()); |
945 |
bool found = tbdInfo.checkFileExists(*this, newPath.c_str()); |
Lines 945-950
Link Here
|
945 |
if ( found ) |
948 |
if ( found ) |
946 |
break; |
949 |
break; |
947 |
} |
950 |
} |
|
|
951 |
#endif |
948 |
|
952 |
|
949 |
FileInfo dylibInfo; |
953 |
FileInfo dylibInfo; |
950 |
{ |
954 |
{ |
Lines 957-962
Link Here
|
957 |
if ( tbdInfo.missing() != dylibInfo.missing() ) { |
961 |
if ( tbdInfo.missing() != dylibInfo.missing() ) { |
958 |
result = tbdInfo.missing() ? dylibInfo : tbdInfo; |
962 |
result = tbdInfo.missing() ? dylibInfo : tbdInfo; |
959 |
} |
963 |
} |
|
|
964 |
#ifdef TAPI |
960 |
// There are both - a text-based stub file and a dynamic library file. |
965 |
// There are both - a text-based stub file and a dynamic library file. |
961 |
else if ( !tbdInfo.missing() && !dylibInfo.missing() ) { |
966 |
else if ( !tbdInfo.missing() && !dylibInfo.missing() ) { |
962 |
// Check if we should prefer the text-based stub file (env var). |
967 |
// Check if we should prefer the text-based stub file (env var). |
Lines 978-983
Link Here
|
978 |
warning("text-based stub file %s and library file %s are out of sync. Falling back to library file for linking.", tbdInfo.path, dylibInfo.path); |
983 |
warning("text-based stub file %s and library file %s are out of sync. Falling back to library file for linking.", tbdInfo.path, dylibInfo.path); |
979 |
result = dylibInfo; |
984 |
result = dylibInfo; |
980 |
} |
985 |
} |
|
|
986 |
#endif |
981 |
} else { |
987 |
} else { |
982 |
return false; |
988 |
return false; |
983 |
} |
989 |
} |
Lines 4135-4141
Link Here
|
4135 |
fprintf(stderr, "LTO support using: %s (static support for %d, runtime is %d)\n", |
4141 |
fprintf(stderr, "LTO support using: %s (static support for %d, runtime is %d)\n", |
4136 |
ltoVers, lto::static_api_version(), lto::runtime_api_version()); |
4142 |
ltoVers, lto::static_api_version(), lto::runtime_api_version()); |
4137 |
#endif |
4143 |
#endif |
|
|
4144 |
#ifdef TAPI |
4138 |
fprintf(stderr, "TAPI support using: %s\n", tapi::Version::getFullVersionAsString().c_str()); |
4145 |
fprintf(stderr, "TAPI support using: %s\n", tapi::Version::getFullVersionAsString().c_str()); |
|
|
4146 |
#endif |
4139 |
exit(0); |
4147 |
exit(0); |
4140 |
} |
4148 |
} |
4141 |
} |
4149 |
} |