summaryrefslogtreecommitdiff
path: root/lib/rubygems/ext/builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/ext/builder.rb')
-rw-r--r--lib/rubygems/ext/builder.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb
index 2fc1074d92..a8bd4c8d1b 100644
--- a/lib/rubygems/ext/builder.rb
+++ b/lib/rubygems/ext/builder.rb
@@ -68,7 +68,9 @@ class Gem::Ext::Builder
results << (command.respond_to?(:shelljoin) ? command.shelljoin : command)
require "open3"
- output, status = Open3.capture2e(*command)
+ # Set $SOURCE_DATE_EPOCH for the subprocess.
+ env = {'SOURCE_DATE_EPOCH' => Gem.source_date_epoch_string}
+ output, status = Open3.capture2e(env, *command)
if verbose
puts output
else