diff --git a/config/projects/gitlab.rb b/config/projects/gitlab.rb
index 43241f4a2405c9b747268616e8988164b05a6964_Y29uZmlnL3Byb2plY3RzL2dpdGxhYi5yYg==..977cbb157b2f284918d596e91e257ca980fc2493_Y29uZmlnL3Byb2plY3RzL2dpdGxhYi5yYg== 100644
--- a/config/projects/gitlab.rb
+++ b/config/projects/gitlab.rb
@@ -261,6 +261,7 @@
 exclude 'embedded/lib/ruby/gems/*/gems/nokogumbo-*/ext'
 exclude 'embedded/lib/ruby/gems/*/gems/rbtrace-*/ext/src'
 exclude 'embedded/lib/ruby/gems/*/gems/rbtrace-*/ext/dst'
+exclude 'embedded/lib/ruby/gems/*/gems/re2-*/ports'
 exclude 'embedded/lib/ruby/gems/*/gems/*pg_query-*/ext'
 
 # Exclude exe files from Python libraries
diff --git a/config/software/gitlab-rails.rb b/config/software/gitlab-rails.rb
index 43241f4a2405c9b747268616e8988164b05a6964_Y29uZmlnL3NvZnR3YXJlL2dpdGxhYi1yYWlscy5yYg==..977cbb157b2f284918d596e91e257ca980fc2493_Y29uZmlnL3NvZnR3YXJlL2dpdGxhYi1yYWlscy5yYg== 100644
--- a/config/software/gitlab-rails.rb
+++ b/config/software/gitlab-rails.rb
@@ -137,7 +137,8 @@
       'google-protobuf' => 'lib/google',
       'grpc' => 'src/ruby/lib/grpc',
       'prometheus-client-mmap' => 'lib',
-      'nokogiri' => 'lib'
+      'nokogiri' => 'lib',
+      're2' => 'lib'
     }
 
     # Delete unused shared libraries included in the gems