diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bcaaaced..143fcb036 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,14 @@ set(is-ia32 0) set(is-mips 0) set(is-mips64 0) set(is-ppc 0) +set(is-ppc64 0) +if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc|powerpc)") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(is-ppc64 1) + else() + set(is-ppc 1) + endif() +endif () set(is-s390 $) string(CONCAT is-x64 $ $<${is-x64}:V8_TARGET_ARCH_X64> $<${is-arm64}:V8_TARGET_ARCH_ARM64> + $<${is-ppc}:V8_TARGET_ARCH_PPC> + $<${is-ppc64}:V8_TARGET_ARCH_PPC64> $<${is-win}:NOMINMAX> $<$:V8_OS_WIN_X64> $<$:V8_CONCURRENT_MARKING> @@ -357,6 +367,21 @@ add_library(v8_base_without_compiler STATIC $<${is-arm64}:v8/src/diagnostics/arm64/eh-frame-arm64.cc> $<${is-arm64}:v8/src/execution/arm64/frame-constants-arm64.cc> $<${is-arm64}:v8/src/regexp/arm64/regexp-macro-assembler-arm64.cc> + $<$:v8/src/codegen/ppc/assembler-ppc.cc> + $<$:v8/src/codegen/ppc/constants-ppc.cc> + $<$:v8/src/codegen/ppc/cpu-ppc.cc> + $<$:v8/src/codegen/ppc/macro-assembler-ppc.cc> + $<$:v8/src/compiler/backend/ppc/code-generator-ppc.cc> + $<$:v8/src/compiler/backend/ppc/instruction-scheduler-ppc.cc> + $<$:v8/src/compiler/backend/ppc/instruction-selector-ppc.cc> + $<$:v8/src/compiler/backend/ppc/unwinding-info-writer-ppc.cc> + $<$:v8/src/deoptimizer/ppc/deoptimizer-ppc.cc> + $<$:v8/src/diagnostics/ppc/disasm-ppc.cc> + $<$:v8/src/diagnostics/ppc/eh-frame-ppc.cc> + $<$:v8/src/diagnostics/ppc/unwinder-ppc.cc> + $<$:v8/src/execution/ppc/frame-constants-ppc.cc> + $<$:v8/src/execution/ppc/simulator-ppc.cc> + $<$:v8/src/regexp/ppc/regexp-macro-assembler-ppc.cc> $<$:$> ${api-sources} ${asmjs-sources} @@ -606,7 +631,10 @@ add_custom_command( mksnapshot --embedded_src ${PROJECT_BINARY_DIR}/embedded.S --startup_src ${PROJECT_BINARY_DIR}/snapshot.cc + $<${is-arm64}:--target_arch=arm64> $<${is-x64}:--target_arch=x64> + $<${is-ppc}:--target_arch=ppc> + $<${is-ppc64}:--target_arch=ppc64> $<$:--target_os=mac> $<$:--target_os=linux> $<$:--target_os=win>