Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macOS build. #920

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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