mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Change how foreign imports work for mac
This commit is contained in:
+7
-1
@@ -1242,12 +1242,18 @@ int main(int arg_count, char **arg_ptr) {
|
|||||||
if (lib.len > 2 && lib[0] == '-' && lib[1] == 'f') {
|
if (lib.len > 2 && lib[0] == '-' && lib[1] == 'f') {
|
||||||
// framework thingie
|
// framework thingie
|
||||||
lib_str = gb_string_append_fmt(lib_str, " -framework %.*s ", (int)(lib.len) - 2, lib.text + 2);
|
lib_str = gb_string_append_fmt(lib_str, " -framework %.*s ", (int)(lib.len) - 2, lib.text + 2);
|
||||||
|
} else if (string_ends_with(lib, str_lit(".framework"))) {
|
||||||
|
// framework thingie
|
||||||
|
String lib_name = lib;
|
||||||
|
lib_name = remove_extension_from_path(lib_name);
|
||||||
|
lib_str = gb_string_append_fmt(lib_str, " -framework %.*s ", LIT(lib_name));
|
||||||
} else if (string_ends_with(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
|
// 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));
|
lib_str = gb_string_append_fmt(lib_str, " %.*s ", LIT(lib));
|
||||||
} else if (string_ends_with(lib, str_lit(".dylib"))) {
|
} else if (string_ends_with(lib, str_lit(".dylib"))) {
|
||||||
// dynamic lib, relative path to executable
|
// dynamic lib, relative path to executable
|
||||||
lib_str = gb_string_append_fmt(lib_str, " -l:%s/%.*s ", cwd, LIT(lib));
|
// lib_str = gb_string_append_fmt(lib_str, " -l:%s/%.*s ", cwd, LIT(lib));
|
||||||
|
lib_str = gb_string_append_fmt(lib_str, " -l%.*s ", LIT(lib));
|
||||||
} else {
|
} else {
|
||||||
// dynamic or static system lib, just link regularly searching system library paths
|
// dynamic or static system lib, just link regularly searching system library paths
|
||||||
lib_str = gb_string_append_fmt(lib_str, " -l%.*s ", LIT(lib));
|
lib_str = gb_string_append_fmt(lib_str, " -l%.*s ", LIT(lib));
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
#pragma warning(disable: 4245)
|
#pragma warning(disable: 4245)
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "utf8proc/utf8proc.h"
|
|
||||||
#include "utf8proc/utf8proc.c"
|
#include "utf8proc/utf8proc.c"
|
||||||
}
|
}
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
|||||||
@@ -40,7 +40,6 @@
|
|||||||
* Implementation of libutf8proc.
|
* Implementation of libutf8proc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "utf8proc.h"
|
#include "utf8proc.h"
|
||||||
#include "utf8proc_data.c"
|
#include "utf8proc_data.c"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user