Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
28d73244
Commit
28d73244
authored
8 years ago
by
Mick Jordan
Browse files
Options
Downloads
Patches
Plain Diff
abort build if required library not found when FASTR_RELEASE is set
parent
30d16b61
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mx.fastr/mx_copylib.py
+9
-4
9 additions, 4 deletions
mx.fastr/mx_copylib.py
with
9 additions
and
4 deletions
mx.fastr/mx_copylib.py
+
9
−
4
View file @
28d73244
...
...
@@ -61,22 +61,24 @@ def _copylib(lib, libpath, target):
except
subprocess
.
CalledProcessError
:
mx
.
abort
(
'
copylib: otool failed
'
)
# copy both files
shutil
.
copy
(
real_libpath
,
target
)
shutil
.
copyfile
(
real_libpath
,
os
.
path
.
join
(
target
,
os
.
path
.
basename
(
real_libpath
)))
mx
.
log
(
'
copied
'
+
lib
+
'
library from
'
+
real_libpath
+
'
to
'
+
target
)
libpath_base
=
os
.
path
.
basename
(
libpath
)
os
.
chdir
(
target
)
if
libpath
!=
real_libpath
:
mx
.
log
(
'
libpath:
'
+
libpath
+
'
real_libpath:
'
+
real_libpath
)
if
os
.
path
.
basename
(
libpath
)
!=
os
.
path
.
basename
(
real_libpath
):
# create a symlink
if
os
.
path
.
exists
(
libpath_base
):
os
.
remove
(
libpath_base
)
mx
.
log
(
'
ln -s
'
+
os
.
path
.
basename
(
real_libpath
)
+
'
'
+
libpath_base
)
os
.
symlink
(
os
.
path
.
basename
(
real_libpath
),
libpath_base
)
# On Darwin we change the id to use @rpath
if
platform
.
system
()
==
'
Darwin
'
:
try
:
mx
.
log
(
'
install_name_tool -id @rpath/
'
+
libpath_base
+
'
'
+
libpath_base
)
subprocess
.
check_call
([
'
install_name_tool
'
,
'
-id
'
,
'
@rpath/
'
+
libpath_base
,
libpath_base
])
except
subprocess
.
CalledProcessError
:
mx
.
abort
(
'
copylib: install_name_tool failed
'
)
# TODO @rpath references within the library?
mx
.
log
(
'
copied
'
+
lib
+
'
library from
'
+
libpath
+
'
to
'
+
target
)
def
copylib
(
args
):
'''
...
...
@@ -111,6 +113,9 @@ def copylib(args):
_copylib
(
args
[
0
],
os
.
path
.
join
(
path
,
f
),
args
[
1
])
return
0
if
os
.
environ
.
has_key
(
'
FASTR_RELEASE
'
):
mx
.
abort
(
args
[
0
]
+
'
not found in PKG_LDFLAGS_OVERRIDE, but required with FASTR_RELEASE
'
)
mx
.
log
(
args
[
0
]
+
'
not found in PKG_LDFLAGS_OVERRIDE, assuming system location
'
)
def
updatelib
(
args
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment