diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2017-11-21 22:33:39 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-21 22:33:39 +0000 |
| commit | 425f83b17d1c15b7486a5f321ad9bfae405f07fa (patch) | |
| tree | 946dfa7862e10ab3a9b00f885f52b8f2d463c671 /src/main.cpp | |
| parent | 976415ff9df68ef8b6ecd06d271bef14d63ea90c (diff) | |
| parent | 4d7fb3e8d6b24340fe9f4217e2c2c04e9a0f3a76 (diff) | |
Merge pull request #150 from zangent/master
Changed `string_has_extension` to `string_ends_with` and fix macOS target triple
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index cc58a7144..7d9470a0f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -859,10 +859,10 @@ int main(int arg_count, char **arg_ptr) { if (lib.len > 2 && lib[0] == '-' && lib[1] == 'f') { // framework thingie lib_str = gb_string_append_fmt(lib_str, " -framework %.*s ", (int)(lib.len) - 2, lib.text + 2); - } else if (string_has_extension(lib, str_lit("a"))) { + } else if (string_ends_with(lib, str_lit(".a"))) { // static libs, absolute full path relative to the file in which the lib was imported from lib_str = gb_string_append_fmt(lib_str, " %.*s ", LIT(lib)); - } else if (string_has_extension(lib, str_lit("dylib"))) { + } else if (string_ends_with(lib, str_lit(".dylib"))) { // dynamic lib, relative path to executable lib_str = gb_string_append_fmt(lib_str, " -l:%s/%.*s ", cwd, LIT(lib)); } else { @@ -875,10 +875,10 @@ int main(int arg_count, char **arg_ptr) { // available at runtime wherever the executable is run, so we make require those to be // local to the executable (unless the system collection is used, in which case we search // the system library paths for the library file). - if (string_has_extension(lib, str_lit("a"))) { + if (string_ends_with(lib, str_lit(".a"))) { // static libs, absolute full path relative to the file in which the lib was imported from lib_str = gb_string_append_fmt(lib_str, " -l:%.*s ", LIT(lib)); - } else if (string_has_extension(lib, str_lit("so"))) { + } else if (string_ends_with(lib, str_lit(".so"))) { // dynamic lib, relative path to executable // NOTE(vassvik): it is the user's responsibility to make sure the shared library files are visible // at runtimeto the executable |