From f4cef31c172e5ceb9b03606f5c6dd316eb054296 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 4 Nov 2023 21:29:11 -0700 Subject: [PATCH] Fix macOS build. --- .travis.yml | 30 ------------------------------ AMBuildScript | 4 ---- appveyor.yml | 6 ------ compiler/sci18n.cpp | 11 +++++++++++ 4 files changed, 11 insertions(+), 40 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 698cc357b..000000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: cpp -dist: xenial -addons: - apt: - packages: - - gcc-multilib - - g++-multilib - - libstdc++6 - - lib32stdc++6 - - libc6-dev - - libc6-dev-i386 - - linux-libc-dev - - linux-libc-dev:i386 -env: - matrix: - - AM_CC=clang AM_CXX=clang++ AM_ARCH=x86,x64 AM_TYPE=optimize -# - AM_CC=emcc AM_CXX=em++ AM_ARCH=x86 AM_TYPE=optimize -# - AM_CC=emcc AM_CXX=em++ AM_ARCH=x86 AM_TYPE=debug - - AM_CC=clang AM_CXX=clang++ AM_ARCH=x86,x64 AM_TYPE=debug -install: - - source ./tools/travis-download-compiler.sh - - CHECKOUT_DIR=$PWD && cd .. && $CHECKOUT_DIR/tools/checkout-deps.sh && cd $CHECKOUT_DIR - - export PATH="~/.local/bin:$PATH" - - $AM_CXX --version -script: - - mkdir objdir - - cd objdir - - CC=$AM_CC CXX=$AM_CXX python ../configure.py --enable-$AM_TYPE --targets=$AM_ARCH - - ambuild - - python $CHECKOUT_DIR/tests/runtests.py . diff --git a/AMBuildScript b/AMBuildScript index a2d4f20ce..b79987f86 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -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'] @@ -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'] diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 8809de002..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 1.0.{build} -clone_folder: c:\projects\sourcepawn -install: -- cmd: .appveyor\setup_environment.bat -build_script: -- cmd: .appveyor\build.bat \ No newline at end of file diff --git a/compiler/sci18n.cpp b/compiler/sci18n.cpp index 3f1138d94..3328ca224 100644 --- a/compiler/sci18n.cpp +++ b/compiler/sci18n.cpp @@ -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, __int32> convert; @@ -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