Skip to content

Commit

Permalink
Fix macOS build.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvander committed Nov 5, 2023
1 parent 032a9ac commit f4cef31
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 40 deletions.
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

4 changes: 0 additions & 4 deletions AMBuildScript
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ class Config(object):
if cxx.target.platform == 'linux':
cxx.postlink += ['-lpthread', '-lrt']
elif cxx.target.platform == 'mac':
cxx.linkflags.remove('-lstdc++')
cxx.cflags += ['-mmacosx-version-min=10.15']
cxx.cflags += ['-stdlib=libc++']
cxx.linkflags += ['-stdlib=libc++']
cxx.linkflags += ['-mmacosx-version-min=10.15']
elif cxx.target.platform == 'windows':
cxx.defines += ['WIN32', '_WINDOWS']
Expand Down Expand Up @@ -144,7 +141,6 @@ class Config(object):
'-Wno-switch',
]
cxx.cxxflags += ['-std=c++17']
cxx.linkflags += ['-lstdc++']

if builder.options.debug == '1':
cxx.cflags += ['-g3']
Expand Down
6 changes: 0 additions & 6 deletions appveyor.yml

This file was deleted.

11 changes: 11 additions & 0 deletions compiler/sci18n.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
#include "errors.h"
#include "sc.h"

#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING

#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif

void UnicodeCodepointToUtf8(ucell codepoint, std::string* out) {
#if defined(_MSC_VER) && _MSC_VER >= 1900 && _MSC_VER < 2000
std::wstring_convert<std::codecvt_utf8<__int32>, __int32> convert;
Expand All @@ -59,3 +66,7 @@ void UnicodeCodepointToUtf8(ucell codepoint, std::string* out) {

*out += convert.to_bytes(&cp, &cp + 1);
}

#if defined(__clang__)
# pragma clang diagnostic pop
#endif

0 comments on commit f4cef31

Please sign in to comment.