Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
65f4a3b1
Kaydet (Commit)
65f4a3b1
authored
Agu 29, 1999
tarafından
Greg Ward
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch from Perry Stoll: caught up with changes in CCompiler necessary (?)
for MSVCCompiler.
üst
32162e83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
unixccompiler.py
Lib/distutils/unixccompiler.py
+21
-8
No files found.
Lib/distutils/unixccompiler.py
Dosyayı görüntüle @
65f4a3b1
...
...
@@ -51,6 +51,11 @@ class UnixCCompiler (CCompiler):
# directories and any module- or package-specific include directories
# are specified via {add,set}_include_dirs(), and there's no way to
# distinguish them. This might be a bug.
_obj_ext
=
'.o'
_exe_ext
=
''
_shared_lib_ext
=
SO
_static_lib_ext
=
'.a'
def
__init__
(
self
,
verbose
=
0
,
...
...
@@ -121,23 +126,29 @@ class UnixCCompiler (CCompiler):
objects
,
output_libname
,
libraries
=
None
,
library_dirs
=
None
):
library_dirs
=
None
,
build_info
=
None
):
# XXX should we sanity check the library name? (eg. no
# slashes)
self
.
link_shared_object
(
objects
,
"lib
%
s
%
s"
%
(
output_libname
,
SO
))
self
.
link_shared_object
(
objects
,
"lib
%
s
%
s"
%
\
(
output_libname
,
self
.
_shared_lib_ext
),
build_info
=
build_info
)
def
link_shared_object
(
self
,
objects
,
output_filename
,
libraries
=
None
,
library_dirs
=
None
):
library_dirs
=
None
,
build_info
=
None
):
if
libraries
is
None
:
libraries
=
[]
if
library_dirs
is
None
:
library_dirs
=
[]
if
build_info
is
None
:
build_info
=
{}
lib_opts
=
_gen_lib_options
(
self
.
libraries
+
libraries
,
self
.
library_dirs
+
library_dirs
)
ld_args
=
self
.
ldflags_shared
+
lib_opts
+
\
...
...
@@ -150,17 +161,19 @@ class UnixCCompiler (CCompiler):
def
object_filenames
(
self
,
source_filenames
):
outnames
=
[]
for
inname
in
source_filenames
:
outnames
.
append
(
re
.
sub
(
r'\.(c|C|cc|cxx)$'
,
'.o'
,
inname
))
outnames
.
append
(
re
.
sub
(
r'\.(c|C|cc|cxx|cpp)$'
,
self
.
_obj_ext
,
inname
))
return
outnames
def
shared_object_filename
(
self
,
source_filename
):
return
re
.
sub
(
r'\.(c|C|cc|cxx
)$'
,
SO
)
return
re
.
sub
(
r'\.(c|C|cc|cxx
|cpp)$'
,
self
.
_shared_lib_ext
)
def
library_filename
(
self
,
libname
):
return
"lib
%
s
.a"
%
libname
return
"lib
%
s
%
s"
%
(
libname
,
self
.
_static_lib_ext
)
def
shared_library_filename
(
self
,
libname
):
return
"lib
%
s.so"
%
libname
return
"lib
%
s
%
s"
%
(
libname
,
self
.
_shared_lib_ext
)
# class UnixCCompiler
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment