Skip to content
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ if (WIN32)
# (e.g. the curly quotes and en/em dashes in src/parse/utils/string.h) as
# multi-character constants -> error C2015. GCC/Clang assume UTF-8, so this
# only bites the MSVC/arm64 build.
add_compile_options(/utf-8)
add_compile_options(/utf-8 /bigobj)
# MSVC's <cmath> only exposes M_PI (used in src/parse/utils/values.h) when
# _USE_MATH_DEFINES is defined before the include -> without it, C2065.
# NOMINMAX stops <windows.h> from defining min()/max() function-like
Expand Down
19 changes: 11 additions & 8 deletions cmake/extlib_lcms2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ else()
set(LCMS2_URL https://github.com/mm2/Little-CMS.git)
set(LCMS2_TAG lcms2.17)

if(MSVC)
# Upstream lcms2 has no CMakeLists and its ./configure cannot run under
# MSVC (no Unix shell on the Windows arm64 runner). Inject a vendored
# CMakeLists.txt and build with the active MSVC generator. Produces
# lcms2.lib.
set(LCMS2_IMPORTED_LIB ${EXTERNALS_PREFIX_PATH}/lib/lcms2.lib)
if(WIN32)
# Windows (MSVC and MinGW): use vendored CMakeLists. Upstream has no
# CMakeLists and its ./configure cannot run under MSVC and is fragile
# under MinGW/Ninja (requires sh/make). Produces lcms2.lib (MSVC) or
# liblcms2.a (MinGW).
if(MSVC)
set(LCMS2_IMPORTED_LIB ${EXTERNALS_PREFIX_PATH}/lib/lcms2.lib)
else()
set(LCMS2_IMPORTED_LIB ${EXTERNALS_PREFIX_PATH}/lib/liblcms2.a)
endif()

ExternalProject_Add(extlib_lcms2
PREFIX extlib_lcms2
Expand All @@ -65,8 +69,7 @@ else()
LOG_DOWNLOAD ON
)
else()
# Unix (macOS/Linux) and MinGW on Windows amd64 build via autotools.
# Produces liblcms2.a.
# Unix (macOS/Linux) build via autotools. Produces liblcms2.a.
set(LCMS2_IMPORTED_LIB ${EXTERNALS_PREFIX_PATH}/lib/liblcms2.a)

ExternalProject_Add(extlib_lcms2
Expand Down
1 change: 1 addition & 0 deletions local_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def build_local(num_threads: int):
"-B", f"{BUILD_DIR}",
f"-DUSE_SYSTEM_DEPS={USE_SYSTEM_DEPS}",
f"-DPYTHON_EXECUTABLE={sys.executable}",
"-DCMAKE_BUILD_TYPE=Release",
]

# Forward CMAKE_GENERATOR so callers (e.g. the CI workflow) can switch the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ template <class T, void* Alloc(size_t, size_t), void Free(void*)>
struct FxPartitionAllocAllocator {
public:
static_assert(std::is_arithmetic<T>::value || std::is_enum<T>::value ||
std::is_class<T>::value ||
IsFXDataPartitionException<T>::value,
"Only numeric types allowed in this partition");

Expand Down
4 changes: 2 additions & 2 deletions src/third_party/pdfium_jbig2/core/fxcrt/immediate_crash.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@

#else

#define TRAP_SEQUENCE1_() asm volatile("int3")
#define TRAP_SEQUENCE2_() asm volatile("ud2")
#define TRAP_SEQUENCE1_() __debugbreak()
#define TRAP_SEQUENCE2_()

#endif // defined(ARCH_CPU_ARM64)

Expand Down
Loading