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 0.94
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   for
76        my @for = @{ $platform->for };
77
78       The Fortran compiler that naturally goes with the C compiler.
79
80   ld
81        my $ld = $platform->ld;
82
83       The C linker
84
85   shellwords
86        my @words = $platform->shellwords(@strings);
87
88       This is a wrapper around Text::ParseWords's "shellwords" with some
89       platform  workarounds applied.
90
91   ccflags
92        my @ccflags = @{ $platform->cflags};
93
94       The compiler flags, including those needed to compile object files that
95       can be linked into a dynamic library.  On Linux, for example, this is
96       usually includes "-fPIC".
97
98   ldflags
99        my @ldflags = @{ $platform->ldflags };
100
101       The linker flags needed to link object files into a dynamic library.
102       This is NOT the "libs" style library flags that specify the location
103       and name of a library to link against, this is instead the flags that
104       tell the linker to generate a dynamic library.  On Linux, for example,
105       this is usually "-shared".
106
107   cc_mm_works
108        my $flags = $platform->cc_mm_works;
109
110       Returns the flags that can be passed into the C compiler to compute
111       dependencies.
112
113   flag_object_output
114        my $flag = $platform->flag_object_output($object_filename);
115
116       Returns the flags that the compiler recognizes as being used to write
117       out to a specific object filename.
118
119   flag_library_output
120        my $flag = $platform->flag_library_output($library_filename);
121
122       Returns the flags that the compiler recognizes as being used to write
123       out to a specific library filename.
124
125   which
126        my $path = $platform->which($command);
127
128       Returns the full path of the given command, if it is available,
129       otherwise "undef" is returned.
130
131   run
132        $platform->run(@command);
133
134   diag
135       Diagnostic for the platform as a string.  This is for human consumption
136       only, and the format may and will change over time so do not attempt to
137       use is programmatically.
138

AUTHOR

140       Author: Graham Ollis <plicease@cpan.org>
141
142       Contributors:
143
144       Bakkiaraj Murugesan (bakkiaraj)
145
146       Dylan Cali (calid)
147
148       pipcet
149
150       Zaki Mughal (zmughal)
151
152       Fitz Elliott (felliott)
153
154       Vickenty Fesunov (vyf)
155
156       Gregor Herrmann (gregoa)
157
158       Shlomi Fish (shlomif)
159
160       Damyan Ivanov
161
162       Ilya Pavlov (Ilya33)
163
164       Petr Pisar (ppisar)
165
166       Mohammad S Anwar (MANWAR)
167
169       This software is copyright (c) 2015,2016,2017,2018,2019 by Graham
170       Ollis.
171
172       This is free software; you can redistribute it and/or modify it under
173       the same terms as the Perl 5 programming language system itself.
174
175
176
177perl v5.30.0                      2019-07-26           FFI::Build::Platform(3)
Impressum