1FFI::Build::Platform(3)User Contributed Perl DocumentatioFnFI::Build::Platform(3)
2
3
4

NAME

6       FFI::Build::Platform - Platform specific configuration.
7

VERSION

9       version 1.58
10

SYNOPSIS

12        use FFI::Build::Platform;
13

DESCRIPTION

15       This class is used to abstract out the platform specific parts of the
16       FFI::Build system.  You shouldn't need to use it directly in most
17       cases, unless you are working on FFI::Build itself.
18

CONSTRUCTOR

20   new
21        my $platform = FFI::Build::Platform->new;
22
23       Create a new instance of FFI::Build::Platform.
24
25   default
26        my $platform = FFI::Build::Platform->default;
27
28       Returns the default instance of FFI::Build::Platform.
29

METHODS

31       All of these methods may be called either as instance or classes
32       methods.  If called as a class method, the default instance will be
33       used.
34
35   osname
36        my $osname = $platform->osname;
37
38       The "os name" as understood by Perl.  This is the same as $^O.
39
40   object_suffix
41        my $suffix = $platform->object_suffix;
42
43       The object suffix for the platform.  On UNIX this is usually ".o".  On
44       Windows this is usually ".obj".
45
46   library_suffix
47        my(@suffix) = $platform->library_suffix;
48        my $suffix  = $platform->library_suffix;
49
50       The library suffix for the platform.  On Linux and some other UNIX this
51       is often ".so".  On OS X, this is ".dylib" and ".bundle".  On Windows
52       this is ".dll".
53
54   library_prefix
55        my $prefix = $platform->library_prefix;
56
57       The library prefix for the platform.  On Unix this is usually "lib", as
58       in "libfoo".
59
60   cc
61        my @cc = @{ $platform->cc };
62
63       The C compiler
64
65   cpp
66        my @cpp = @{ $platform->cpp };
67
68       The C pre-processor
69
70   cxx
71        my @cxx = @{ $platform->cxx };
72
73       The C++ compiler that naturally goes with the C compiler.
74
75   cxxld
76        my @cxxld = @{ $platform->cxxld };
77
78       The C++ linker that naturally goes with the C compiler.
79
80   for
81        my @for = @{ $platform->for };
82
83       The Fortran compiler that naturally goes with the C compiler.
84
85   ld
86        my $ld = $platform->ld;
87
88       The C linker
89
90   shellwords
91        my @words = $platform->shellwords(@strings);
92
93       This is a wrapper around Text::ParseWords's "shellwords" with some
94       platform  workarounds applied.
95
96   ccflags
97        my @ccflags = @{ $platform->cflags};
98
99       The compiler flags, including those needed to compile object files that
100       can be linked into a dynamic library.  On Linux, for example, this is
101       usually includes "-fPIC".
102
103   ldflags
104        my @ldflags = @{ $platform->ldflags };
105
106       The linker flags needed to link object files into a dynamic library.
107       This is NOT the "libs" style library flags that specify the location
108       and name of a library to link against, this is instead the flags that
109       tell the linker to generate a dynamic library.  On Linux, for example,
110       this is usually "-shared".
111
112   cc_mm_works
113        my $bool = $platform->cc_mm_works;
114
115       Returns the flags that can be passed into the C compiler to compute
116       dependencies.
117
118   flag_object_output
119        my @flags = $platform->flag_object_output($object_filename);
120
121       Returns the flags that the compiler recognizes as being used to write
122       out to a specific object filename.
123
124   flag_library_output
125        my @flags = $platform->flag_library_output($library_filename);
126
127       Returns the flags that the compiler recognizes as being used to write
128       out to a specific library filename.
129
130   flag_exe_output
131        my @flags = $platform->flag_exe_output($library_filename);
132
133       Returns the flags that the compiler recognizes as being used to write
134       out to a specific exe filename.
135
136   flag_export
137        my @flags = $platform->flag_export(@symbols);
138
139       Returns the flags that the linker recognizes for exporting functions.
140
141   which
142        my $path = $platform->which($command);
143
144       Returns the full path of the given command, if it is available,
145       otherwise "undef" is returned.
146
147   run
148        $platform->run(@command);
149
150   diag
151       Diagnostic for the platform as a string.  This is for human consumption
152       only, and the format may and will change over time so do not attempt to
153       use is programmatically.
154

AUTHOR

156       Author: Graham Ollis <plicease@cpan.org>
157
158       Contributors:
159
160       Bakkiaraj Murugesan (bakkiaraj)
161
162       Dylan Cali (calid)
163
164       pipcet
165
166       Zaki Mughal (zmughal)
167
168       Fitz Elliott (felliott)
169
170       Vickenty Fesunov (vyf)
171
172       Gregor Herrmann (gregoa)
173
174       Shlomi Fish (shlomif)
175
176       Damyan Ivanov
177
178       Ilya Pavlov (Ilya33)
179
180       Petr Písař (ppisar)
181
182       Mohammad S Anwar (MANWAR)
183
184       Håkon Hægland (hakonhagland, HAKONH)
185
186       Meredith (merrilymeredith, MHOWARD)
187
188       Diab Jerius (DJERIUS)
189
190       Eric Brine (IKEGAMI)
191
192       szTheory
193
194       José Joaquín Atria (JJATRIA)
195
196       Pete Houston (openstrike, HOUSTON)
197
199       This software is copyright (c) 2015-2022 by Graham Ollis.
200
201       This is free software; you can redistribute it and/or modify it under
202       the same terms as the Perl 5 programming language system itself.
203
204
205
206perl v5.34.1                      2022-06-20           FFI::Build::Platform(3)
Impressum