Issue #10089: Add support for arbitrary -X options on the command-line.
They can be retrieved through a new attribute `sys._xoptions`.
diff --git a/Modules/main.c b/Modules/main.c
index 7df883c..008b6a4 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -47,7 +47,7 @@
 static int  orig_argc;
 
 /* command line options */
-#define BASE_OPTS L"bBc:dEhiJm:OsStuvVW:xX?"
+#define BASE_OPTS L"bBc:dEhiJm:OsStuvVW:xX:?"
 
 #define PROGRAM_OPTS BASE_OPTS
 
@@ -84,6 +84,7 @@
 -W arg : warning control; arg is action:message:category:module:lineno\n\
          also PYTHONWARNINGS=arg\n\
 -x     : skip first line of source, allowing use of non-Unix forms of #!cmd\n\
+-X opt : set implementation-specific option\n\
 ";
 static char *usage_4 = "\
 file   : program read from script file\n\
@@ -407,8 +408,6 @@
             skipfirstline = 1;
             break;
 
-        /* case 'X': reserved for implementation-specific arguments */
-
         case 'h':
         case '?':
             help++;
@@ -422,6 +421,10 @@
             PySys_AddWarnOption(_PyOS_optarg);
             break;
 
+        case 'X':
+            PySys_AddXOption(_PyOS_optarg);
+            break;
+
         /* This space reserved for other options */
 
         default: