build: fix getting OpenSSL version on Windows

Node.js on Windows is built with `clang`, not `gcc`.

PR-URL: https://github.com/nodejs/node/pull/59609
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Michaël Zasso
2025-09-04 11:28:24 +02:00
committed by GitHub
parent b8fa294994
commit a87f1c140e

View File

@@ -20,9 +20,9 @@ os.chdir(Path(__file__).parent)
original_argv = sys.argv[1:]
# gcc and g++ as defaults matches what GYP's Makefile generator does,
# except on OS X.
CC = os.environ.get('CC', 'cc' if sys.platform == 'darwin' else 'gcc')
CXX = os.environ.get('CXX', 'c++' if sys.platform == 'darwin' else 'g++')
# except on macOS and Windows.
CC = os.environ.get('CC', 'cc' if sys.platform == 'darwin' else 'clang' if sys.platform == 'win32' else 'gcc')
CXX = os.environ.get('CXX', 'c++' if sys.platform == 'darwin' else 'clang' if sys.platform == 'win32' else 'g++')
tools_path = Path('tools')