1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- use strict;
- use warnings;
- my ($cflags, $platform) = @ARGV;
- $cflags = "compiler: $cflags";
- my $date = gmtime($ENV{'SOURCE_DATE_EPOCH'} || time()) . " UTC";
- print <<"END_OUTPUT";
- static const char compiler_flags[] = {
- END_OUTPUT
- my $ctr = 0;
- foreach my $c (split
- $c =~ s|([\\'])|\\$1|;
- # Max 16 characters per line
- if (($ctr++ % 16) == 0) {
- if ($ctr != 1) {
- print "\n";
- }
- print " ";
- }
- print "'$c',";
- }
- print <<"END_OUTPUT";
- '\\0'
- };
- END_OUTPUT
|