diff --git a/.gitattributes b/.gitattributes index 58d73653580..818d7339647 100644 --- a/.gitattributes +++ b/.gitattributes @@ -48,7 +48,6 @@ Dockerfile text *.yaml text *.yml text .dockerignore text -uid_entrypoint text # Qt *.pro text diff --git a/.github/workflows/code-cleanliness.yml b/.github/workflows/code-cleanliness.yml index dc8ad24c353..eb04ca4a40e 100644 --- a/.github/workflows/code-cleanliness.yml +++ b/.github/workflows/code-cleanliness.yml @@ -13,7 +13,7 @@ jobs: - name: Run Check Code Cleanliness with Docker uses: addnab/docker-run-action@v3 with: - image: quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install-github@sha256:6949adee26f78e9968e16d52bc3accfd7b51d0f16c473ad4b6f1caee849ab519 + image: quay.io/eclipse-cdt/cdt-infra-github@sha256:3d745b7b84e3f9f9492cc1d280ea3b44028a92c7e9748d1ea8771fed211b5dc4 options: -v ${{ github.workspace }}:/work run: | set -x diff --git a/BUILDING.md b/BUILDING.md index 60a4a341270..592f0c44eea 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -25,7 +25,7 @@ To build CDT plug-ins you need a standard Maven & Java development environment. The CI build automatically run code cleanliness checks. To run them on your computer it is recommended to use the Docker image, for example like this from the root of the checked out CDT repo: ```sh -docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install:latest releng/scripts/check_code_cleanliness.sh +docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra:latest releng/scripts/check_code_cleanliness.sh ``` ### Profiles @@ -160,7 +160,7 @@ An additional tip is to set the following in `.gitconfig` to allow you to diff ` When the host is Windows, getting docker to behave as encoded in the pom.xml may be challenging, instead a command like this will probably work (replace your path to git root). Note that running this in git bash causes problems because of the /work in the command line arguments. (TODO integrate this command line way of running into the pom.xml so the original instructions work.) -`docker 'run' '--rm' '-t' '-v' 'D:\cdt\git\org.eclipse.cdt:/work' '-w' '/work/core/org.eclipse.cdt.core.native' 'quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest' 'make' '-C' 'native_src' 'rebuild'` +`docker 'run' '--rm' '-t' '-v' 'D:\cdt\git\org.eclipse.cdt:/work' '-w' '/work/core/org.eclipse.cdt.core.native' 'quay.io/eclipse-cdt/cdt-infra:latest' 'make' '-C' 'native_src' 'rebuild'` See also `jniheaders` profile above. diff --git a/NewAndNoteworthy/CDT-12.0.md b/NewAndNoteworthy/CDT-12.0.md index 1d7aa822a0f..c4eb943905a 100644 --- a/NewAndNoteworthy/CDT-12.0.md +++ b/NewAndNoteworthy/CDT-12.0.md @@ -6,6 +6,12 @@ This is the New & Noteworthy page for CDT 12.0 which is part of Eclipse 2025-03 # Release Notes +## Minimum version of GLIBC required + +The minimum version of GLIBC required is now 2.31. +This version can be found in Ubuntu 20.04 and later, RHEL 9.0 and later and other distros as well. +CDT's native components will likely work with older versions of glibc too, assuming they provide the required APIs for Eclipse CDT. + # Managed Build ## Other objects for GNU archive files diff --git a/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libpty.so b/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libpty.so index 3c2ec1047da..b89f230227d 100755 Binary files a/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libpty.so and b/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libpty.so differ diff --git a/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so b/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so index 5abbeda17fd..b8670e1c473 100755 Binary files a/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so and b/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so differ diff --git a/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libpty.so b/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libpty.so index d59d51b7452..b18bb6bf45f 100755 Binary files a/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libpty.so and b/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libpty.so differ diff --git a/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so b/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so index a064b0b1560..2beea79a2b3 100755 Binary files a/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so and b/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so differ diff --git a/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libpty.so b/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libpty.so index cfd41f315e8..42bfa97d3a8 100755 Binary files a/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libpty.so and b/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libpty.so differ diff --git a/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so b/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so index e739435d35a..da4ea4b14ea 100755 Binary files a/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so and b/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so differ diff --git a/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libpty.jnilib b/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libpty.jnilib index b801728a7ba..3b44008af39 100755 Binary files a/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libpty.jnilib and b/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libpty.jnilib differ diff --git a/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib b/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib index d667decc2c7..e5877dff490 100755 Binary files a/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib and b/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib differ diff --git a/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libpty.jnilib b/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libpty.jnilib index f3827e81292..0a711db1f04 100755 Binary files a/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libpty.jnilib and b/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libpty.jnilib differ diff --git a/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib b/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib index 682d532cf06..513370e9f9b 100755 Binary files a/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib and b/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib differ diff --git a/core/org.eclipse.cdt.core.native/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.native/META-INF/MANIFEST.MF index 2464c2b74b2..f404a9a4e06 100644 --- a/core/org.eclipse.cdt.core.native/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.native/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt.core.native;singleton:=true -Bundle-Version: 6.3.500.qualifier +Bundle-Version: 6.3.600.qualifier Bundle-Activator: org.eclipse.cdt.internal.core.natives.CNativePlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core.native/native_src/.gitignore b/core/org.eclipse.cdt.core.native/native_src/.gitignore new file mode 100644 index 00000000000..c395c62e34a --- /dev/null +++ b/core/org.eclipse.cdt.core.native/native_src/.gitignore @@ -0,0 +1,2 @@ +*.o +*.obj diff --git a/core/org.eclipse.cdt.core.native/native_src/Makefile b/core/org.eclipse.cdt.core.native/native_src/Makefile index e697a513efc..78c55db4989 100644 --- a/core/org.eclipse.cdt.core.native/native_src/Makefile +++ b/core/org.eclipse.cdt.core.native/native_src/Makefile @@ -1,5 +1,5 @@ #******************************************************************************* -# Copyright (c) 2002, 2015, 2020 QNX Software Systems and others. +# Copyright (c) 2002, 2015, 2024 QNX Software Systems and others. # # This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -11,6 +11,7 @@ # Contributors: # QNX Software Systems - initial API and implementation # Torbjörn Svensson - Bug 521515 - Adopted jenkins build +# Tue Ton - support for Windows on Arm64 #*******************************************************************************/ SHELL=/bin/bash -o pipefail ifeq ($(JAVA_HOME),) @@ -20,13 +21,15 @@ endif REPRODUCIBLE_BUILD_WRAPPER := $(shell git rev-parse --show-toplevel)/releng/scripts/reproducible_build_wrapper.py OS_DIR_WIN32_X86_64 := ../../org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64 +OS_DIR_WIN32_AARCH64 := ../../org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64 OS_DIR_LINUX_X86_64 := ../../org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64 OS_DIR_LINUX_AARCH64 := ../../org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64 OS_DIR_LINUX_PPC64LE := ../../org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le OS_DIR_MACOS_X86_64 := ../../org.eclipse.cdt.core.macosx/os/macosx/x86_64 OS_DIR_MACOS_AARCH64 := ../../org.eclipse.cdt.core.macosx/os/macosx/aarch64 -COMMON_CFLAGS := -Wall -pedantic -Werror +COMMON_CFLAGS := -Wall -pedantic -Werror -std=gnu11 +COMMON_CCFLAGS := -Wall -pedantic -Werror -std=gnu++14 UNAME = $(shell uname) ifeq ($(UNAME),Linux) @@ -52,12 +55,20 @@ LIBS = \ $(OS_DIR_MACOS_AARCH64)/libspawner.jnilib \ $(OS_DIR_MACOS_AARCH64)/libpty.jnilib else +ifeq ($(findstring ARM64,$(UNAME)),ARM64) +COMMON_CFLAGS := -Wall -pedantic -std=gnu11 +COMMON_CCFLAGS := -Wall -pedantic -std=gnu++14 +LIBS = \ + $(OS_DIR_WIN32_AARCH64)/starter.exe \ + $(OS_DIR_WIN32_AARCH64)/spawner.dll +else LIBS = \ $(OS_DIR_WIN32_X86_64)/starter.exe \ $(OS_DIR_WIN32_X86_64)/spawner.dll \ $(OS_DIR_WIN32_X86_64)/pty.dll endif endif +endif all: $(LIBS) @@ -72,7 +83,9 @@ MAC_TO_SIGN=$(OS_DIR_MACOS_X86_64)/libspawner.jnilib \ $(OS_DIR_MACOS_AARCH64)/libpty.jnilib WIN_TO_SIGN=$(OS_DIR_WIN32_X86_64)/starter.exe \ $(OS_DIR_WIN32_X86_64)/spawner.dll \ - $(OS_DIR_WIN32_X86_64)/pty.dll + $(OS_DIR_WIN32_X86_64)/pty.dll \ + $(OS_DIR_WIN32_AARCH64)/starter.exe \ + $(OS_DIR_WIN32_AARCH64)/spawner.dll ### This block of code also exists in native/org.eclipse.cdt.native.serial/native_src/Makefile TMPDIR := $(shell mktemp -d -t production-XXXXXXXXXX) .PHONY: production @@ -116,11 +129,28 @@ $(OS_DIR_WIN32_X86_64)/spawner.dll: win/iostream.c win/raise.c win/spawner.c win $(OS_DIR_WIN32_X86_64)/pty.dll: win/pty.cpp win/pty_dllmain.cpp win/util.c mkdir -p $(dir $@) && \ $(REPRODUCIBLE_BUILD_WRAPPER) \ - x86_64-w64-mingw32-g++ $(COMMON_CFLAGS) -o $@ -Iinclude -Iwin/include -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" \ + x86_64-w64-mingw32-g++ $(COMMON_CCFLAGS) -o $@ -Iinclude -Iwin/include -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" \ -DUNICODE \ $^ \ -Wl,--kill-at --shared -L$(OS_DIR_WIN32_X86_64) -lwinpty -static-libstdc++ -static-libgcc +# Windows aarch64 +$(OS_DIR_WIN32_AARCH64)/starter.exe: win/starter.c win/util.c + mkdir -p $(dir $@) && \ + $(REPRODUCIBLE_BUILD_WRAPPER) \ + aarch64-w64-mingw32-gcc $(COMMON_CFLAGS) -o $@ -Iinclude -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" \ + -DUNICODE \ + $^ \ + -lpsapi + +$(OS_DIR_WIN32_AARCH64)/spawner.dll: win/iostream.c win/raise.c win/spawner.c win/Win32ProcessEx.c win/util.c + mkdir -p $(dir $@) && \ + $(REPRODUCIBLE_BUILD_WRAPPER) \ + aarch64-w64-mingw32-gcc $(COMMON_CFLAGS) -o $@ -Iinclude -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" \ + -DUNICODE \ + $^ \ + -Wl,--kill-at --shared + # Linux x86_64 $(OS_DIR_LINUX_X86_64)/libspawner.so: unix/spawner.c unix/io.c unix/exec_unix.c unix/exec_pty.c unix/openpty.c unix/pfind.c mkdir -p $(dir $@) && \ diff --git a/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c b/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c index db7c829ff57..29babd9766c 100644 --- a/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c +++ b/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c @@ -85,7 +85,7 @@ static void close_all_fds_fallback(unsigned int from_fd_inclusive) { } } -static void close_all_fds() { +static void close_all_fds(void) { unsigned int from_fd = STDERR_FILENO + 1; if (sys_close_range_wrapper(from_fd) == 0) return; diff --git a/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c b/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c index 129de40c99b..8712ee23ddf 100644 --- a/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c +++ b/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c @@ -84,7 +84,7 @@ static void close_all_fds_fallback(unsigned int from_fd_inclusive) { } } -static void close_all_fds() { +static void close_all_fds(void) { unsigned int from_fd = STDERR_FILENO + 1; if (sys_close_range_wrapper(from_fd) == 0) { return; diff --git a/core/org.eclipse.cdt.core.native/native_src/win/util.c b/core/org.eclipse.cdt.core.native/native_src/win/util.c index 13041c39be6..167c6c4a10e 100644 --- a/core/org.eclipse.cdt.core.native/native_src/win/util.c +++ b/core/org.eclipse.cdt.core.native/native_src/win/util.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 Torbjörn Svensson and others. + * Copyright (c) 2020, 2024 Torbjörn Svensson and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -16,6 +16,7 @@ #include #include +#include static bool spawner = false; static bool spawnerDetails = false; diff --git a/core/org.eclipse.cdt.core.native/plugin.properties b/core/org.eclipse.cdt.core.native/plugin.properties index b78918fe964..a45e52d0e08 100644 --- a/core/org.eclipse.cdt.core.native/plugin.properties +++ b/core/org.eclipse.cdt.core.native/plugin.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2003, 2015 IBM Corporation and others. +# Copyright (c) 2003, 2024 IBM Corporation and others. # # This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -24,4 +24,5 @@ fragmentName.linux.x86_64 = C/C++ Development Tools Core Native Utilities for Li fragmentName.linux.aarch64 = C/C++ Development Tools Core Native Utilities for Linux (aarch64) fragmentName.win32 = C/C++ Development Tools Core Native Utilities for Windows fragmentName.win32.x86_64 = C/C++ Development Tools Core Native Utilities for Windows (x86_64) +fragmentName.win32.aarch64 = C/C++ Development Tools Core Native Utilities for Windows (aarch64) fragmentName.macosx = C/C++ Development Tools Core Native Utilities for MacOS X diff --git a/core/org.eclipse.cdt.core.native/pom.xml b/core/org.eclipse.cdt.core.native/pom.xml index d4fa6122a7e..9782382c7be 100644 --- a/core/org.eclipse.cdt.core.native/pom.xml +++ b/core/org.eclipse.cdt.core.native/pom.xml @@ -23,7 +23,7 @@ ../../pom.xml - 6.3.500-SNAPSHOT + 6.3.600-SNAPSHOT org.eclipse.cdt.core.native eclipse-plugin @@ -79,7 +79,7 @@ - + @@ -87,7 +87,7 @@ - + diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.java b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.java index b72519e70cb..03886b81798 100644 --- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.java +++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.java @@ -17,6 +17,9 @@ public class Messages extends NLS { public static String PTY_FailedToStartConPTY; + public static String PTY_FailedToStartNativePTY; + public static String PTY_FailedToStartPTY; + public static String PTY_FailedToStartWinPTY; public static String PTY_NoClassDefFoundError; public static String Util_exception_cannotCreatePty; public static String Util_exception_cannotSetTerminalSize; diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.properties b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.properties index 8e91c7b37f8..8df8dae06d1 100644 --- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.properties +++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/internal/core/natives/Messages.properties @@ -13,7 +13,10 @@ # Martin Oberhuber (Wind River) - [303083] Split from CCorePluginResources.properties ############################################################################### -PTY_FailedToStartConPTY=Failed start a new style ConPTY. This is expected on Windows machines before Windows 10 1904 version and will fall back to WinPTY. Please consider upgrading to a newer version of Windows 10 to take advantage of the new improved console behavior. +PTY_FailedToStartConPTY=Failed start a new style ConPTY. This is expected on Windows machines before Windows 10 1904 version and will fall back to WinPTY. Please consider upgrading to a newer version of Windows to take advantage of the new improved console behavior. +PTY_FailedToStartNativePTY=Failed to load the PTY library. This may indicate a configuration problem, but can be ignored if no further problems are observed. +PTY_FailedToStartPTY=Failed to load the PTY library. This may indicate a configuration problem, but can be ignored if no further problems are observed. +PTY_FailedToStartWinPTY=Failed start WinPTY due to an exception. Please consider upgrading to a newer version of Windows to take advantage of the new improved console behavior. PTY_NoClassDefFoundError=Failed start a new style ConPTY due to NoClassDefFoundError which probably means that the optional dependency on JNA is not available. Consider updating your product to include JNA to enable the ConPTY. Util_exception_cannotCreatePty=Cannot create pty Util_exception_closeError=close error diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/ConPTY.java b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/ConPTY.java index 22f2e4c738d..8206b1e37a3 100644 --- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/ConPTY.java +++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/ConPTY.java @@ -239,14 +239,18 @@ public synchronized void close() throws IOException { } boolean res; - res = ConPTYKernel32.INSTANCE.CloseHandle(handles.processInformation.hThread); - checkErr(res, "CloseHandle processInformation.hThread"); //$NON-NLS-1$ + if (handles.processInformation != null) { + res = ConPTYKernel32.INSTANCE.CloseHandle(handles.processInformation.hThread); + checkErr(res, "CloseHandle processInformation.hThread"); //$NON-NLS-1$ - res = ConPTYKernel32.INSTANCE.CloseHandle(handles.processInformation.hProcess); - checkErr(res, "CloseHandle processInformation.hProcess"); //$NON-NLS-1$ + res = ConPTYKernel32.INSTANCE.CloseHandle(handles.processInformation.hProcess); + checkErr(res, "CloseHandle processInformation.hProcess"); //$NON-NLS-1$ + } - ConPTYKernel32.INSTANCE.DeleteProcThreadAttributeList(handles.startupInfo.lpAttributeList); - handles.threadAttributeListMemory.clear(); + if (handles.startupInfo != null) { + ConPTYKernel32.INSTANCE.DeleteProcThreadAttributeList(handles.startupInfo.lpAttributeList); + handles.threadAttributeListMemory.clear(); + } ConPTYKernel32.INSTANCE.ClosePseudoConsole(handles.pseudoConsole.getValue()); diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTY.java b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTY.java index ad169aadd22..821cf8bdf15 100644 --- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTY.java +++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTY.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2021 QNX Software Systems and others. + * Copyright (c) 2002, 2024 QNX Software Systems and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -28,6 +28,20 @@ */ public class PTY { + /** + * Java property key that can be set to false disable ConPTY. + * + * Defaults to True. + */ + private static final String CONPTY_ENABLED_PROP = "org.eclipse.cdt.core.conpty_enabled"; //$NON-NLS-1$ + /** + * Java property key that can be set to true to force console mode + * to be allowed on Windows. + * + * Defaults to False. + */ + private static final String FORCE_CONSOLE_MODE_ENABLED_PROP = "org.eclipse.cdt.core.winpty_console_mode"; //$NON-NLS-1$ + /** * The pty modes. * @since 5.6 @@ -55,18 +69,40 @@ public enum Mode { */ int master; - private static boolean hasPTY; - - private enum IS_CONPTY { - CONPTY_UNKNOWN, CONPTY_YES, CONPTY_NO; + private enum PTY_TYPE { + /** + * PTY type has not been determined yet, + * it will be determined for the system on first PTY that is created. + */ + PTY_UNKNOWN, + /** + * On newer Windows 10 and later, use ConPTY API to connected a console. + */ + PTY_CONPTY, + /** + * On Windows, as a fallback use WinPTY. + */ + PTY_WINPTY, + /** + * On Linux/macOS PTY operations just work and no special API is needed. + */ + PTY_NATIVE, + /** + * There is no functional PTY on this system. An error message will be logged + * and future operations on PTY will fail. + */ + PTY_BROKEN; } /** - * We don't know if we have conpty until we try - so this starts - * null and will be true or false once it is determined. + * The type of API that is in use. + */ + private static PTY_TYPE ptyType = PTY_TYPE.PTY_UNKNOWN; + + /** + * Whether console mode is supported. Always true when ptyType == PTY_NATIVE, + * on Windows can be enabled with system property {@value #FORCE_CONSOLE_MODE_ENABLED_PROP} */ - private static IS_CONPTY isConPTY = IS_CONPTY.CONPTY_UNKNOWN; - private static boolean isWinPTY; private static boolean isConsoleModeSupported; private static boolean setTerminalSizeErrorAlreadyLogged; private ConPTY conPTY; @@ -99,7 +135,7 @@ public static boolean isSupported() { * @since 5.6 */ public static boolean isSupported(Mode mode) { - return hasPTY && (isConsoleModeSupported || mode == Mode.TERMINAL); + return ptyType != PTY_TYPE.PTY_BROKEN && (isConsoleModeSupported || mode == Mode.TERMINAL); } /** @@ -133,39 +169,29 @@ public PTY() throws IOException { */ public PTY(Mode mode) throws IOException { this.mode = mode; + if (isConsole() && !isConsoleModeSupported) { throw new IOException(Messages.Util_exception_cannotCreatePty); } + PTYInputStream inInit = null; PTYOutputStream outInit = null; String slaveInit = null; - if (isConPTY != IS_CONPTY.CONPTY_NO) { - try { - conPTY = new ConPTY(); - isConPTY = IS_CONPTY.CONPTY_YES; - slaveInit = "conpty"; //$NON-NLS-1$ - inInit = new ConPTYInputStream(conPTY); - outInit = new ConPTYOutputStream(conPTY); - } catch (NoClassDefFoundError e) { - isConPTY = IS_CONPTY.CONPTY_NO; - CNativePlugin.log(Messages.PTY_NoClassDefFoundError, e); - } catch (Throwable e) { - isConPTY = IS_CONPTY.CONPTY_NO; - CNativePlugin.log(Messages.PTY_FailedToStartConPTY, e); - } - } - - // fall through in exception case as well as normal non-conPTY - if (isConPTY == IS_CONPTY.CONPTY_NO) { - - slaveInit = hasPTY ? openMaster(isConsole()) : null; + // con pty has its own implementation of everything, so everything is delegated to conPTY + if (ptyType == PTY_TYPE.PTY_CONPTY) { + conPTY = new ConPTY(); + slaveInit = "conpty"; //$NON-NLS-1$ + inInit = new ConPTYInputStream(conPTY); + outInit = new ConPTYOutputStream(conPTY); + } else { + slaveInit = (ptyType != PTY_TYPE.PTY_BROKEN) ? openMaster(isConsole()) : null; if (slaveInit == null) { throw new IOException(Messages.Util_exception_cannotCreatePty); } inInit = new PTYInputStream(new MasterFD()); - outInit = new PTYOutputStream(new MasterFD(), !isWinPTY); + outInit = new PTYOutputStream(new MasterFD(), ptyType != PTY_TYPE.PTY_WINPTY); } slave = slaveInit; in = inInit; @@ -181,7 +207,7 @@ public PTY(Mode mode) throws IOException { public void validateSlaveName() throws IOException { // on windows the slave name is just an internal identifier // and does not represent a real device - if (isWinPTY) { + if (ptyType == PTY_TYPE.PTY_CONPTY || ptyType == PTY_TYPE.PTY_WINPTY) { throw new IOException("Slave name is not valid"); //$NON-NLS-1$ } } @@ -228,7 +254,7 @@ public PTYInputStream getInputStream() { */ public final void setTerminalSize(int width, int height) { try { - if (isConPTY == IS_CONPTY.CONPTY_YES) { + if (ptyType == PTY_TYPE.PTY_CONPTY) { conPTY.setTerminalSize(width, height); } else { change_window_size(master, width, height); @@ -248,9 +274,9 @@ public final void setTerminalSize(int width, int height) { */ public int exec_pty(Spawner spawner, String[] cmdarray, String[] envp, String dir, IChannel[] chan) throws IOException { - if (isConPTY == IS_CONPTY.CONPTY_YES) { + if (ptyType == PTY_TYPE.PTY_CONPTY) { return conPTY.exec(cmdarray, envp, dir); - } else if (isWinPTY) { + } else if (ptyType == PTY_TYPE.PTY_WINPTY) { return exec2(cmdarray, envp, dir, chan, slave, master, isConsole()); } else { return spawner.exec2(cmdarray, envp, dir, chan, slave, master, isConsole()); @@ -262,9 +288,9 @@ public int exec_pty(Spawner spawner, String[] cmdarray, String[] envp, String di * @since 5.6 */ public int waitFor(Spawner spawner, int pid) { - if (isConPTY == IS_CONPTY.CONPTY_YES) { + if (ptyType == PTY_TYPE.PTY_CONPTY) { return conPTY.waitFor(); - } else if (isWinPTY) { + } else if (ptyType == PTY_TYPE.PTY_WINPTY) { return waitFor(master, pid); } else { return spawner.waitFor(pid); @@ -287,35 +313,51 @@ native int exec2(String[] cmdarray, String[] envp, String dir, IChannel[] chan, native int waitFor(int masterFD, int processID); static { - try { - boolean isWindows = Platform.OS_WIN32.equals(Platform.getOS()); - if (!isWindows) { - isConPTY = IS_CONPTY.CONPTY_NO; - } - // Disable ConPTY if the user needs to - boolean conPtyEnabled = Boolean - .parseBoolean(System.getProperty("org.eclipse.cdt.core.conpty_enabled", "true")); //$NON-NLS-1$ //$NON-NLS-2$ - if (!conPtyEnabled) { - isConPTY = IS_CONPTY.CONPTY_NO; + if (Platform.OS_WIN32.equals(Platform.getOS())) { + boolean conPtyEnabled = Boolean.parseBoolean(System.getProperty(CONPTY_ENABLED_PROP, "true")); //$NON-NLS-1$ + if (conPtyEnabled) { + try { + // Try creating and closing a ConPTY to see if the API is available. + ConPTY pty = new ConPTY(); + pty.close(); + ptyType = PTY_TYPE.PTY_CONPTY; + isConsoleModeSupported = Boolean.getBoolean(FORCE_CONSOLE_MODE_ENABLED_PROP); + + } catch (NoClassDefFoundError e) { + CNativePlugin.log(Messages.PTY_NoClassDefFoundError, e); + } catch (Throwable e) { + CNativePlugin.log(Messages.PTY_FailedToStartConPTY, e); + } } - isWinPTY = isWindows; - if (isWindows) { - // When we used to build with VC++ we used DelayLoadDLLs (See Gerrit 167674 and Bug 521515) so that the winpty - // could be found. When we ported to mingw we didn't port across this feature because it was simpler to just - // manually load winpty first. - System.loadLibrary("winpty"); //$NON-NLS-1$ + if (ptyType == PTY_TYPE.PTY_UNKNOWN) { + try { + // When we used to build with VC++ we used DelayLoadDLLs (See Gerrit 167674 and Bug 521515) so that the winpty + // could be found. When we ported to mingw we didn't port across this feature because it was simpler to just + // manually load winpty first. + System.loadLibrary("winpty"); //$NON-NLS-1$ + System.loadLibrary("pty"); //$NON-NLS-1$ + ptyType = PTY_TYPE.PTY_WINPTY; + isConsoleModeSupported = Boolean.getBoolean(FORCE_CONSOLE_MODE_ENABLED_PROP); + } catch (Throwable e) { + CNativePlugin.log(Messages.PTY_FailedToStartWinPTY, e); + } + } + } else { + try { + System.loadLibrary("pty"); //$NON-NLS-1$ + ptyType = PTY_TYPE.PTY_NATIVE; + isConsoleModeSupported = true; + } catch (Throwable e) { + CNativePlugin.log(Messages.PTY_FailedToStartNativePTY, e); } - System.loadLibrary("pty"); //$NON-NLS-1$ - hasPTY = true; - // on windows console mode is not supported except for experimental use - // to enable it, set system property org.eclipse.cdt.core.winpty_console_mode=true - isConsoleModeSupported = !isWinPTY || Boolean.getBoolean("org.eclipse.cdt.core.winpty_console_mode"); //$NON-NLS-1$ - } catch (SecurityException | UnsatisfiedLinkError e) { - CNativePlugin.log( - "Failed to load the PTY library. This may indicate a configuration problem, but can be ignored if no further problems are observed.", //$NON-NLS-1$ - e); } - } + if (ptyType == PTY_TYPE.PTY_UNKNOWN) { + ptyType = PTY_TYPE.PTY_BROKEN; + isConsoleModeSupported = true; + CNativePlugin.log(Messages.PTY_FailedToStartPTY); + } + + } } diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYInputStream.java b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYInputStream.java index ed0410a2310..37873532840 100644 --- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYInputStream.java +++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYInputStream.java @@ -93,9 +93,4 @@ protected void finalize() throws IOException { private native int read0(int fd, byte[] buf, int len) throws IOException; private native int close0(int fd) throws IOException; - - static { - System.loadLibrary("pty"); //$NON-NLS-1$ - } - } diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java index 8e719beba28..9304c091692 100644 --- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java +++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTYOutputStream.java @@ -100,9 +100,4 @@ protected void finalize() throws IOException { private native int write0(int fd, byte[] b, int len) throws IOException; private native int close0(int fd) throws IOException; - - static { - System.loadLibrary("pty"); //$NON-NLS-1$ - } - } diff --git a/core/org.eclipse.cdt.core.win32.aarch64/.project b/core/org.eclipse.cdt.core.win32.aarch64/.project new file mode 100644 index 00000000000..21a060ada30 --- /dev/null +++ b/core/org.eclipse.cdt.core.win32.aarch64/.project @@ -0,0 +1,22 @@ + + + org.eclipse.cdt.core.win32.aarch64 + + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + + diff --git a/core/org.eclipse.cdt.core.win32.aarch64/.settings/org.eclipse.core.resources.prefs b/core/org.eclipse.cdt.core.win32.aarch64/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000000..99f26c0203a --- /dev/null +++ b/core/org.eclipse.cdt.core.win32.aarch64/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/core/org.eclipse.cdt.core.win32.aarch64/.settings/org.eclipse.pde.api.tools.prefs b/core/org.eclipse.cdt.core.win32.aarch64/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..ec9fbf321d0 --- /dev/null +++ b/core/org.eclipse.cdt.core.win32.aarch64/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,184 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Error +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Warning +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/core/org.eclipse.cdt.core.win32.aarch64/.settings/org.eclipse.pde.prefs b/core/org.eclipse.cdt.core.win32.aarch64/.settings/org.eclipse.pde.prefs new file mode 100644 index 00000000000..ffaa8e3f1a7 --- /dev/null +++ b/core/org.eclipse.cdt.core.win32.aarch64/.settings/org.eclipse.pde.prefs @@ -0,0 +1,36 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=0 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=0 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.exec-env-too-low=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.no.automatic.module=1 +compilers.p.not-externalized-att=1 +compilers.p.service.component.without.lazyactivation=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=0 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=0 +compilers.p.unknown-resource=0 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +compilers.use-project=true +eclipse.preferences.version=1 diff --git a/core/org.eclipse.cdt.core.win32.aarch64/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.win32.aarch64/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..505e6c8998a --- /dev/null +++ b/core/org.eclipse.cdt.core.win32.aarch64/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName.win32.aarch64 +Bundle-SymbolicName: org.eclipse.cdt.core.win32.aarch64;singleton:=true +Bundle-Version: 12.0.0.qualifier +Fragment-Host: org.eclipse.cdt.core.native;bundle-version="[6.3.0,7.0.0)" +Eclipse-PlatformFilter: (&(osgi.os=win32)(osgi.arch=aarch64)) +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Eclipse-BundleShape: dir diff --git a/core/org.eclipse.cdt.core.win32.aarch64/about.html b/core/org.eclipse.cdt.core.win32.aarch64/about.html new file mode 100644 index 00000000000..b3134865230 --- /dev/null +++ b/core/org.eclipse.cdt.core.win32.aarch64/about.html @@ -0,0 +1,38 @@ + + + + + + About + + + +

About This Content

+ +

November 30, 2017

+

License

+ +

+ The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at https://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

+ If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at https://www.eclipse.org. +

+ + + + \ No newline at end of file diff --git a/core/org.eclipse.cdt.core.win32.aarch64/build.properties b/core/org.eclipse.cdt.core.win32.aarch64/build.properties new file mode 100644 index 00000000000..bc4ad8fb30c --- /dev/null +++ b/core/org.eclipse.cdt.core.win32.aarch64/build.properties @@ -0,0 +1,18 @@ +############################################################################### +# Copyright (c) 2011, 2024 Marc-Andre Laperle and others. +# +# This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Marc-Andre Laperle - initial API and implementation +############################################################################### +bin.includes = META-INF/,\ + os/,\ + about.html,\ + plugin.properties +src.includes = about.html diff --git a/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/.gitignore b/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/.gitignore new file mode 100644 index 00000000000..f72ad3b96aa --- /dev/null +++ b/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/.gitignore @@ -0,0 +1,5 @@ +*.exp +*.pdb +pty.lib +spawner.lib + diff --git a/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/spawner.dll b/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/spawner.dll new file mode 100755 index 00000000000..719cbb3e538 Binary files /dev/null and b/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/spawner.dll differ diff --git a/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/starter.exe b/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/starter.exe new file mode 100755 index 00000000000..18f3b2304e4 Binary files /dev/null and b/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/starter.exe differ diff --git a/core/org.eclipse.cdt.core.win32.aarch64/plugin.properties b/core/org.eclipse.cdt.core.win32.aarch64/plugin.properties new file mode 100644 index 00000000000..6065068d5c0 --- /dev/null +++ b/core/org.eclipse.cdt.core.win32.aarch64/plugin.properties @@ -0,0 +1,2 @@ +fragmentName.win32.aarch64=C/C++ Development Tools Core for Windows on Arm64 +providerName=Eclipse CDT diff --git a/core/org.eclipse.cdt.core.win32.aarch64/pom.xml b/core/org.eclipse.cdt.core.win32.aarch64/pom.xml new file mode 100644 index 00000000000..ecbb57ca206 --- /dev/null +++ b/core/org.eclipse.cdt.core.win32.aarch64/pom.xml @@ -0,0 +1,71 @@ + + + + 4.0.0 + + + org.eclipse.cdt + cdt-parent + 12.0.0-SNAPSHOT + ../../pom.xml + + + 12.0.0-SNAPSHOT + org.eclipse.cdt.core.win32.aarch64 + eclipse-plugin + + + + + org.eclipse.tycho + target-platform-configuration + + consider + + + win32 + win32 + aarch64 + + + + + + org.eclipse.tycho + tycho-source-plugin + + + plugin-source + none + + + attach-source + none + + + + + org.eclipse.tycho + tycho-packaging-plugin + + + default + + + + + diff --git a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll index a3a9e575f26..cbb08b47f0d 100755 Binary files a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll and b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll differ diff --git a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll index 4e903369fab..34fb1660fb3 100755 Binary files a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll and b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll differ diff --git a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/starter.exe b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/starter.exe index 1ab1cc62b92..2df552045f0 100755 Binary files a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/starter.exe and b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/starter.exe differ diff --git a/core/org.eclipse.cdt.core.win32/pom.xml b/core/org.eclipse.cdt.core.win32/pom.xml index 4680b3cf0f6..66af6d75a84 100644 --- a/core/org.eclipse.cdt.core.win32/pom.xml +++ b/core/org.eclipse.cdt.core.win32/pom.xml @@ -1,6 +1,6 @@ + @@ -87,7 +87,7 @@ - + diff --git a/pom.xml b/pom.xml index c862491e0ef..a47c14d31db 100644 --- a/pom.xml +++ b/pom.xml @@ -131,6 +131,7 @@ core/org.eclipse.cdt.core.linux.ppc64le core/org.eclipse.cdt.core.win32 core/org.eclipse.cdt.core.win32.x86_64 + core/org.eclipse.cdt.core.win32.aarch64 core/org.eclipse.cdt.core.macosx core/org.eclipse.cdt.core core/org.eclipse.cdt.ui @@ -685,6 +686,11 @@ win32 x86_64 + + win32 + win32 + aarch64 + macosx cocoa @@ -732,6 +738,7 @@ + diff --git a/releng/CDT.setup b/releng/CDT.setup index b1d737bf7d6..0089b0a36b1 100644 --- a/releng/CDT.setup +++ b/releng/CDT.setup @@ -205,7 +205,7 @@ xsi:type="git:GitCloneTask" id="github.clone.cdt-lsp" remoteURI="eclipse-cdt/cdt-lsp" - checkoutBranch="master"> + checkoutBranch="main">