From 421e10375e7a0925a7fb4f5be7f810a2d6440a73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <rverschelde@gmail.com>
Date: Tue, 27 Sep 2022 13:45:02 +0200
Subject: [PATCH] SCons: Fix MSVC warning LNK4042 about dupe objects in regex

(cherry picked from commit 3fd9452a8ccd2c261ae7757a9b1fed1b6ada1c73)
---
 modules/regex/SCsub | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/regex/SCsub b/modules/regex/SCsub
index deb9db7591f..6fd7cd47f38 100644
--- a/modules/regex/SCsub
+++ b/modules/regex/SCsub
@@ -58,10 +58,10 @@ if env["builtin_pcre2"]:
         env_pcre2["OBJSUFFIX"] = "_" + width + env_pcre2["OBJSUFFIX"]
         env_pcre2.Append(CPPDEFINES=[("PCRE2_CODE_UNIT_WIDTH", width)])
         env_pcre2.add_source_files(thirdparty_obj, thirdparty_sources)
-        env.modules_sources += thirdparty_obj
 
     pcre2_builtin("16")
     pcre2_builtin("32")
+    env.modules_sources += thirdparty_obj
 
 
 # Godot source files