From daece6a0ed9547cc104d4a1e2f95f8c395588739 Mon Sep 17 00:00:00 2001 From: Ashcon Partovi Date: Mon, 18 Nov 2024 20:04:55 -0800 Subject: [PATCH] Revert "cmake: Set explicit rustc target" This reverts commit cba3bda8ecaccf030007c9270d5ab4260fa491e8. --- cmake/targets/BuildLolHtml.cmake | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/cmake/targets/BuildLolHtml.cmake b/cmake/targets/BuildLolHtml.cmake index 0828b749217f16..aeac571321c24d 100644 --- a/cmake/targets/BuildLolHtml.cmake +++ b/cmake/targets/BuildLolHtml.cmake @@ -16,45 +16,18 @@ else() set(LOLHTML_BUILD_TYPE release) endif() -if(ARCH STREQUAL "x64") - set(RUST_ARCH x86_64) -elseif(ARCH STREQUAL "aarch64") - set(RUST_ARCH aarch64) -else() - unsupported(ARCH) -endif() - -if(WIN32) - set(RUST_TARGET ${RUST_ARCH}-pc-windows-msvc) -elseif(APPLE) - set(RUST_TARGET ${RUST_ARCH}-apple-darwin) -elseif(LINUX) - if(ABI STREQUAL "musl") - set(RUST_TARGET ${RUST_ARCH}-unknown-linux-musl) - else() - set(RUST_TARGET ${RUST_ARCH}-unknown-linux-gnu) - endif() -else() - unsupported(CMAKE_SYSTEM_NAME) -endif() - set(LOLHTML_LIBRARY ${LOLHTML_BUILD_PATH}/${LOLHTML_BUILD_TYPE}/${CMAKE_STATIC_LIBRARY_PREFIX}lolhtml${CMAKE_STATIC_LIBRARY_SUFFIX}) set(LOLHTML_BUILD_ARGS --target-dir ${BUILD_PATH}/lolhtml ) -# FIXME: On Windows, the build does not emit a .lib file when a target is specified. -if(NOT WIN32) - list(APPEND LOLHTML_BUILD_ARGS --target ${RUST_TARGET}) -endif() - if(RELEASE) list(APPEND LOLHTML_BUILD_ARGS --release) endif() # Windows requires unwind tables, apparently. -if(NOT WIN32) +if (NOT WIN32) # The encoded escape sequences are intentional. They're how you delimit multiple arguments in a single environment variable. # Also add rust optimization flag for smaller binary size, but not huge speed penalty. set(RUSTFLAGS "-Cpanic=abort-Cdebuginfo=0-Cforce-unwind-tables=no-Copt-level=s")