Repository: compiler-explorer/compiler-explorer (ts)

Issue:
[LIB REQUEST]: Add Python 3.9, 3.10, 3.11, 3.12, 3.13, and remove all the older versions.
### Library name

Python

### Library description

Currently gcc.godbolt.org offers Python, but it offers versions that have reached "End of Life", as such add in 3.9+ all the way up to 3.13 for now until 3.14 releases sometime in October or November of this year which will cause Python 3.9 to reach "End of Life".

### Library repository

https://github.com/python/cpython

### Motivation

The reason is because the versions are too old for sharing the header only version of PyAwaitable to prove a bit of code compiles just fine for gcc/clang but not for cl.exe. PyAwaitable only supports Python 3.9, 3.10, 3.11, 3.12, 3.13 or newer until Python 3.9 reaches end of life.

Pull request description:
Add recent Pythons as libraries for C-like languages
Resolves #7261.

Patch:
diff --git a/etc/config/c++.amazon.properties b/etc/config/c++.amazon.properties
index cb50e0737..a075a6a65 100644
--- a/etc/config/c++.amazon.properties
+++ b/etc/config/c++.amazon.properties
@@ -5184,7 +5184,7 @@ libs.pybind11.versions.2_11_1.path=/opt/compiler-explorer/libs/pybind11/v2.11.1/
 
 libs.python.name=Python
 libs.python.url=https://python.org
-libs.python.versions=359:3610:376:381
+libs.python.versions=359:3610:376:381:396:3100:3110:3121:3130
 libs.python.versions.359.version=3.5.9
 libs.python.versions.359.path=/opt/compiler-explorer/python-3.5.9/include/python3.5
 libs.python.versions.3610.version=3.6.10
@@ -5193,6 +5193,16 @@ libs.python.versions.376.version=3.7.6
 libs.python.versions.376.path=/opt/compiler-explorer/python-3.7.6/include/python3.7
 libs.python.versions.381.version=3.8.1
 libs.python.versions.381.path=/opt/compiler-explorer/python-3.8.1/include/python3.8
+libs.python.versions.396.version=3.9.6
+libs.python.versions.396.path=/opt/compiler-explorer/python-3.9.6/include/python3.9
+libs.python.versions.3100.version=3.10.0
+libs.python.versions.3100.path=/opt/compiler-explorer/python-3.10.0/include/python3.10
+libs.python.versions.3110.version=3.11.0
+libs.python.versions.3110.path=/opt/compiler-explorer/python-3.11.0/include/python3.11
+libs.python.versions.3121.version=3.12.1
+libs.python.versions.3121.path=/opt/compiler-explorer/python-3.12.1/include/python3.12
+libs.python.versions.3130.version=3.13.0
+libs.python.versions.3130.path=/opt/compiler-explorer/python-3.13.0/include/python3.13
 
 libs.qt.name=Qt
 libs.qt.url=https://www.qt.io
diff --git a/etc/config/c.amazon.properties b/etc/config/c.amazon.properties
index bec57413d..c1bf4e1f2 100644
--- a/etc/config/c.amazon.properties
+++ b/etc/config/c.amazon.properties
@@ -3577,7 +3577,7 @@ libs.openssl.versions.111g.libpath=/opt/compiler-explorer/libs/openssl/openssl_1
 
 libs.python.name=Python
 libs.python.url=https://python.org
-libs.python.versions=359:3610:376:381
+libs.python.versions=359:3610:376:381:396:3100:3110:3121:3130
 libs.python.versions.359.version=3.5.9
 libs.python.versions.359.path=/opt/compiler-explorer/python-3.5.9/include/python3.5
 libs.python.versions.3610.version=3.6.10
@@ -3586,6 +3586,16 @@ libs.python.versions.376.version=3.7.6
 libs.python.versions.376.path=/opt/compiler-explorer/python-3.7.6/include/python3.7
 libs.python.versions.381.version=3.8.1
 libs.python.versions.381.path=/opt/compiler-explorer/python-3.8.1/include/python3.8
+libs.python.versions.396.version=3.9.6
+libs.python.versions.396.path=/opt/compiler-explorer/python-3.9.6/include/python3.9
+libs.python.versions.3100.version=3.10.0
+libs.python.versions.3100.path=/opt/compiler-explorer/python-3.10.0/include/python3.10
+libs.python.versions.3110.version=3.11.0
+libs.python.versions.3110.path=/opt/compiler-explorer/python-3.11.0/include/python3.11
+libs.python.versions.3121.version=3.12.1
+libs.python.versions.3121.path=/opt/compiler-explorer/python-3.12.1/include/python3.12
+libs.python.versions.3130.version=3.13.0
+libs.python.versions.3130.path=/opt/compiler-explorer/python-3.13.0/include/python3.13
 
 libs.simde.name=SIMDe
 libs.simde.description=Implementations of SIMD instruction sets for systems which don't natively support them.
diff --git a/etc/config/circle.amazon.properties b/etc/config/circle.amazon.properties
index 6d7f48ee7..f6f238cbe 100644
--- a/etc/config/circle.amazon.properties
+++ b/etc/config/circle.amazon.properties
@@ -894,7 +894,7 @@ libs.pugixml.versions.1114.path=/opt/compiler-explorer/libs/pugixml/v1.11.4/src/
 
 libs.python.name=Python
 libs.python.url=https://python.org
-libs.python.versions=359:3610:376:381
+libs.python.versions=359:3610:376:381:396:3100:3110:3121:3130
 libs.python.versions.359.version=3.5.9
 libs.python.versions.359.path=/opt/compiler-explorer/python-3.5.9/include/python3.5
 libs.python.versions.3610.version=3.6.10
@@ -903,6 +903,16 @@ libs.python.versions.376.version=3.7.6
 libs.python.versions.376.path=/opt/compiler-explorer/python-3.7.6/include/python3.7
 libs.python.versions.381.version=3.8.1
 libs.python.versions.381.path=/opt/compiler-explorer/python-3.8.1/include/python3.8
+libs.python.versions.396.version=3.9.6
+libs.python.versions.396.path=/opt/compiler-explorer/python-3.9.6/include/python3.9
+libs.python.versions.3100.version=3.10.0
+libs.python.versions.3100.path=/opt/compiler-explorer/python-3.10.0/include/python3.10
+libs.python.versions.3110.version=3.11.0
+libs.python.versions.3110.path=/opt/compiler-explorer/python-3.11.0/include/python3.11
+libs.python.versions.3121.version=3.12.1
+libs.python.versions.3121.path=/opt/compiler-explorer/python-3.12.1/include/python3.12
+libs.python.versions.3130.version=3.13.0
+libs.python.versions.3130.path=/opt/compiler-explorer/python-3.13.0/include/python3.13
 
 libs.rangesv3.name=range-v3
 libs.rangesv3.versions=trunk:030:035:036:091:0100:0110
diff --git a/etc/config/gimple.amazon.properties b/etc/config/gimple.amazon.properties
index 90315dcea..60b4410f4 100644
--- a/etc/config/gimple.amazon.properties
+++ b/etc/config/gimple.amazon.properties
@@ -1616,7 +1616,7 @@ libs.openssl.versions.111g.libpath=/opt/compiler-explorer/libs/openssl/openssl_1
 
 libs.python.name=Python
 libs.python.url=https://python.org
-libs.python.versions=359:3610:376:381
+libs.python.versions=359:3610:376:381:396:3100:3110:3121:3130
 libs.python.versions.359.version=3.5.9
 libs.python.versions.359.path=/opt/compiler-explorer/python-3.5.9/include/python3.5
 libs.python.versions.3610.version=3.6.10
@@ -1625,6 +1625,16 @@ libs.python.versions.376.version=3.7.6
 libs.python.versions.376.path=/opt/compiler-explorer/python-3.7.6/include/python3.7
 libs.python.versions.381.version=3.8.1
 libs.python.versions.381.path=/opt/compiler-explorer/python-3.8.1/include/python3.8
+libs.python.versions.396.version=3.9.6
+libs.python.versions.396.path=/opt/compiler-explorer/python-3.9.6/include/python3.9
+libs.python.versions.3100.version=3.10.0
+libs.python.versions.3100.path=/opt/compiler-explorer/python-3.10.0/include/python3.10
+libs.python.versions.3110.version=3.11.0
+libs.python.versions.3110.path=/opt/compiler-explorer/python-3.11.0/include/python3.11
+libs.python.versions.3121.version=3.12.1
+libs.python.versions.3121.path=/opt/compiler-explorer/python-3.12.1/include/python3.12
+libs.python.versions.3130.version=3.13.0
+libs.python.versions.3130.path=/opt/compiler-explorer/python-3.13.0/include/python3.13
 
 libs.simde.name=SIMDe
 libs.simde.description=Implementations of SIMD instruction sets for systems which don't natively support them.
diff --git a/etc/config/objc++.amazon.properties b/etc/config/objc++.amazon.properties
index 67a6ac7e9..0f9f115e6 100644
--- a/etc/config/objc++.amazon.properties
+++ b/etc/config/objc++.amazon.properties
@@ -1682,7 +1682,7 @@ libs.pugixml.versions.1114.path=/opt/compiler-explorer/libs/pugixml/v1.11.4/src/
 
 libs.python.name=Python
 libs.python.url=https://python.org
-libs.python.versions=359:3610:376:381
+libs.python.versions=359:3610:376:381:396:3100:3110:3121:3130
 libs.python.versions.359.version=3.5.9
 libs.python.versions.359.path=/opt/compiler-explorer/python-3.5.9/include/python3.5
 libs.python.versions.3610.version=3.6.10
@@ -1691,6 +1691,16 @@ libs.python.versions.376.version=3.7.6
 libs.python.versions.376.path=/opt/compiler-explorer/python-3.7.6/include/python3.7
 libs.python.versions.381.version=3.8.1
 libs.python.versions.381.path=/opt/compiler-explorer/python-3.8.1/include/python3.8
+libs.python.versions.396.version=3.9.6
+libs.python.versions.396.path=/opt/compiler-explorer/python-3.9.6/include/python3.9
+libs.python.versions.3100.version=3.10.0
+libs.python.versions.3100.path=/opt/compiler-explorer/python-3.10.0/include/python3.10
+libs.python.versions.3110.version=3.11.0
+libs.python.versions.3110.path=/opt/compiler-explorer/python-3.11.0/include/python3.11
+libs.python.versions.3121.version=3.12.1
+libs.python.versions.3121.path=/opt/compiler-explorer/python-3.12.1/include/python3.12
+libs.python.versions.3130.version=3.13.0
+libs.python.versions.3130.path=/opt/compiler-explorer/python-3.13.0/include/python3.13
 
 libs.rangesv3.name=range-v3
 libs.rangesv3.versions=trunk:030:035:036:091:0100:0110:0120
diff --git a/etc/config/objc.amazon.properties b/etc/config/objc.amazon.properties
index 0f52371bf..1256f1182 100644
--- a/etc/config/objc.amazon.properties
+++ b/etc/config/objc.amazon.properties
@@ -1024,7 +1024,7 @@ libs.openssl.versions.111g.libpath=/opt/compiler-explorer/libs/openssl/openssl_1
 
 libs.python.name=Python
 libs.python.url=https://python.org
-libs.python.versions=359:3610:376:381
+libs.python.versions=359:3610:376:381:396:3100:3110:3121:3130
 libs.python.versions.359.version=3.5.9
 libs.python.versions.359.path=/opt/compiler-explorer/python-3.5.9/include/python3.5
 libs.python.versions.3610.version=3.6.10
@@ -1033,6 +1033,16 @@ libs.python.versions.376.version=3.7.6
 libs.python.versions.376.path=/opt/compiler-explorer/python-3.7.6/include/python3.7
 libs.python.versions.381.version=3.8.1
 libs.python.versions.381.path=/opt/compiler-explorer/python-3.8.1/include/python3.8
+libs.python.versions.396.version=3.9.6
+libs.python.versions.396.path=/opt/compiler-explorer/python-3.9.6/include/python3.9
+libs.python.versions.3100.version=3.10.0
+libs.python.versions.3100.path=/opt/compiler-explorer/python-3.10.0/include/python3.10
+libs.python.versions.3110.version=3.11.0
+libs.python.versions.3110.path=/opt/compiler-explorer/python-3.11.0/include/python3.11
+libs.python.versions.3121.version=3.12.1
+libs.python.versions.3121.path=/opt/compiler-explorer/python-3.12.1/include/python3.12
+libs.python.versions.3130.version=3.13.0
+libs.python.versions.3130.path=/opt/compiler-explorer/python-3.13.0/include/python3.13
 
 libs.simde.name=SIMDe
 libs.simde.description=Implementations of SIMD instruction sets for systems which don't natively support them.
diff --git a/lib/compilers/rust.ts b/lib/compilers/rust.ts
index 0d70412c1..4e28546ba 100644
--- a/lib/compilers/rust.ts
+++ b/lib/compilers/rust.ts
@@ -247,7 +247,7 @@ export class RustCompiler extends BaseCompiler {
     }
 
     override optionsForFilter(filters: ParseFiltersAndOutputOptions, outputFilename: string, userOptions?: string[]) {
-        let options = ['-C', 'debuginfo=1', '-o', this.filename(outputFilename)];
+        let options = ['-C', 'debuginfo=2', '-o', this.filename(outputFilename)];
 
         const userRequestedEmit = _.any(unwrap(userOptions), opt => opt.includes('--emit'));
         if (filters.binary) {


Test patch:
diff --git a/test/base-compiler-tests.ts b/test/base-compiler-tests.ts
index 6da95af7e..a54c865e8 100644
--- a/test/base-compiler-tests.ts
+++ b/test/base-compiler-tests.ts
@@ -856,7 +856,7 @@ describe('Rust overrides', () => {
         );
         expect(originalOptions).toEqual([
             '-C',
-            'debuginfo=1',
+            'debuginfo=2',
             '-o',
             'output.txt',
             '--crate-type',
@@ -870,6 +870,6 @@ describe('Rust overrides', () => {
                     value: 'aarch64-linux-something',
                 },
             ]),
-        ).toEqual(['-C', 'debuginfo=1', '-o', 'output.txt', '--crate-type', 'bin', '-Clinker=/usr/aarch64/bin/gcc']);
+        ).toEqual(['-C', 'debuginfo=2', '-o', 'output.txt', '--crate-type', 'bin', '-Clinker=/usr/aarch64/bin/gcc']);
     });
 });