FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-for-android/pythonforandroid/tools/liblink at 0.5.3 · tcdude/python-for-android · GitHub
tcdude
/
python-for-android
Public
forked from
kivy/python-for-android
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-for-android
/
pythonforandroid
/
tools
/
liblink
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
101 lines (76 loc) · 2.19 KB
Breadcrumbs
python-for-android
/
pythonforandroid
/
tools
/
liblink
Copy path
File metadata and controls
executable file
·
101 lines (76 loc) · 2.19 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/env python2.7
from
__future__
import
print_function
import
sys
import
subprocess
from
os
import
environ
from
os
.
path
import
basename
,
join
libs
=
[ ]
objects
=
[ ]
output
=
None
copylibs
=
environ
.
get
(
'COPYLIBS'
,
'0'
)
==
'1'
i
=
1
while
i
<
len
(
sys
.
argv
):
opt
=
sys
.
argv
[
i
]
i
+=
1
if
opt
==
"-o"
:
output
=
sys
.
argv
[
i
]
i
+=
1
continue
if
opt
.
startswith
(
"-l"
)
or
opt
.
startswith
(
"-L"
):
libs
.
append
(
opt
)
continue
if
opt
in
(
"-r"
,
"-pipe"
,
"-no-cpp-precomp"
):
continue
if
opt
in
(
"--sysroot"
,
"-isysroot"
,
"-framework"
,
"-undefined"
,
"-macosx_version_min"
):
i
+=
1
continue
if
opt
.
startswith
(
"-I"
):
continue
if
opt
.
startswith
(
"-m"
):
continue
if
opt
.
startswith
(
"-f"
):
continue
if
opt
.
startswith
(
"-O"
):
continue
if
opt
.
startswith
(
"-g"
):
continue
if
opt
.
startswith
(
"-D"
):
continue
if
opt
.
startswith
(
"-R"
):
# for -rpath, not implemented yet.
continue
if
opt
.
startswith
(
"-"
):
print
(
sys
.
argv
)
print
(
"Unknown option: %s"
%
opt
)
sys
.
exit
(
1
)
if
not
opt
.
endswith
(
'.o'
):
continue
objects
.
append
(
opt
)
print
(
'liblink path is'
,
str
(
environ
.
get
(
'LIBLINK_PATH'
)))
abs_output
=
join
(
environ
.
get
(
'LIBLINK_PATH'
),
basename
(
output
))
if
not
copylibs
:
f
=
open
(
output
,
"w"
)
f
.
close
()
output
=
abs_output
f
=
open
(
output
+
".libs"
,
"w"
)
f
.
write
(
" "
.
join
(
libs
))
f
.
close
()
sys
.
exit
(
subprocess
.
call
([
environ
.
get
(
'LD'
),
'-r'
,
'-o'
,
output
+
'.o'
#, '-arch', environ.get('ARCH')
]
+
objects
))
else
:
with
open
(
abs_output
+
'.libs'
,
'w'
)
as
f_libs
:
with
open
(
abs_output
+
'.libdirs'
,
'w'
)
as
f_libdirs
:
for
l
in
libs
:
if
l
[
1
]
==
'l'
:
f_libs
.
write
(
l
[
2
:])
f_libs
.
write
(
' '
)
else
:
f_libdirs
.
write
(
l
[
2
:])
f_libdirs
.
write
(
' '
)
libargs
=
' '
.
join
([
"'%s'"
%
arg
for
arg
in
sys
.
argv
[
1
:]])
cmd
=
'%s -shared %s %s'
%
(
environ
[
'CC'
],
environ
[
'LDFLAGS'
],
libargs
)
sys
.
exit
(
subprocess
.
call
(
cmd
,
shell
=
True
))
Back
|
FazBrowse Home
|
New Git URL