diff --git a/make/autoconf/flags-other.m4 b/make/autoconf/flags-other.m4 index f0fa82489df..5629a625736 100644 --- a/make/autoconf/flags-other.m4 +++ b/make/autoconf/flags-other.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -115,7 +115,11 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS], # Force preprocessor to run, just to make sure BASIC_ASFLAGS="-x assembler-with-cpp" elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then - BASIC_ASFLAGS="-nologo -c" + if test "x$OPENJDK_TARGET_CPU" = xaarch64; then + BASIC_ASFLAGS="-nologo" + else + BASIC_ASFLAGS="-nologo -c" + fi fi AC_SUBST(BASIC_ASFLAGS) diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4 index d50538108a4..5bb999bc05f 100644 --- a/make/autoconf/flags.m4 +++ b/make/autoconf/flags.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -320,12 +320,16 @@ AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL], [ if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then CC_OUT_OPTION=-Fo + if test "x$OPENJDK_TARGET_CPU" != xaarch64; then + AS_NON_ASM_EXTENSION_OPTION=-Ta + fi else # The option used to specify the target .o,.a or .so file. # When compiling, how to specify the to be created object file. CC_OUT_OPTION='-o$(SPACE)' fi AC_SUBST(CC_OUT_OPTION) + AC_SUBST(AS_NON_ASM_EXTENSION_OPTION) # Generate make dependency files if test "x$TOOLCHAIN_TYPE" = xgcc; then diff --git a/make/autoconf/spec.gmk.template b/make/autoconf/spec.gmk.template index e720916d88a..2364fc81fed 100644 --- a/make/autoconf/spec.gmk.template +++ b/make/autoconf/spec.gmk.template @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -493,6 +493,7 @@ CXX_VERSION_NUMBER := @CXX_VERSION_NUMBER@ HOTSPOT_TOOLCHAIN_TYPE := @HOTSPOT_TOOLCHAIN_TYPE@ CC_OUT_OPTION := @CC_OUT_OPTION@ +AS_NON_ASM_EXTENSION_OPTION := @AS_NON_ASM_EXTENSION_OPTION@ # Flags used for overriding the default opt setting for a C/C++ source file. C_O_FLAG_HIGHEST_JVM := @C_O_FLAG_HIGHEST_JVM@ diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4 index b7a01074686..24577876e45 100644 --- a/make/autoconf/toolchain.m4 +++ b/make/autoconf/toolchain.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -655,8 +655,11 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE], if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then AS="$CC -c" else - if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then - # On 64 bit windows, the assembler is "ml64.exe" + if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then + # On Windows aarch64, the assembler is "armasm64.exe" + UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, armasm64) + elif test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then + # On Windows x64, the assembler is "ml64.exe" UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml64) else # otherwise, the assembler is "ml.exe" diff --git a/make/common/native/CompileFile.gmk b/make/common/native/CompileFile.gmk index 9c3d39d6edf..cf33c64f21e 100644 --- a/make/common/native/CompileFile.gmk +++ b/make/common/native/CompileFile.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -236,7 +236,7 @@ define CreateCompiledNativeFileBody # For assembler calls just create empty dependency lists $$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \ $$($1_COMPILER) $$($1_FLAGS) \ - $(CC_OUT_OPTION)$$($1_OBJ) -Ta $$($1_SRC_FILE))) \ + $(CC_OUT_OPTION)$$($1_OBJ) $(AS_NON_ASM_EXTENSION_OPTION) $$($1_SRC_FILE))) \ | $(TR) -d '\r' | $(GREP) -v -e "Assembling:" || test "$$$$?" = "1" ; \ $(ECHO) > $$($1_DEPS_FILE) ; \ $(ECHO) > $$($1_DEPS_TARGETS_FILE)