forked from alliedmodders/ambuild
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dsymutil and strip support for executable and shared library buil…
…ders (bug 5997 part 10, r=ds).
- Loading branch information
David Anderson
committed
Dec 28, 2013
1 parent
e6d789f
commit 2f9a0be
Showing
8 changed files
with
121 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -lt 3 ]; then | ||
echo "Usage: <file> <linker> <...linker args>"; | ||
exit 1; | ||
fi | ||
|
||
LD_FILE=$1 | ||
LD_EXEC=$2 | ||
|
||
shift; | ||
shift; | ||
|
||
$LD_EXEC $@ | ||
if [ $? -ne 0 ]; then | ||
exit $? | ||
fi | ||
dsymutil $LD_FILE | ||
if [ $? -ne 0 ]; then | ||
exit $? | ||
fi | ||
strip -S $LD_FILE | ||
if [ $? -ne 0 ]; then | ||
exit $? | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# vim: set ts=8 sts=2 tw=99 et ft=python: | ||
import os, sys | ||
|
||
builder.DetectCompilers() | ||
|
||
program = builder.compiler.Program("hello") | ||
program.sources = [ | ||
'main.cpp' | ||
] | ||
builder.Add(program) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# vim: set sts=2 ts=8 sw=2 tw=99 et: | ||
import sys | ||
from ambuild2 import run | ||
|
||
builder = run.PrepareBuild(sourcePath = sys.path[0]) | ||
builder.Configure() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <stdio.h> | ||
|
||
int main() | ||
{ | ||
return printf("hello!\n"); | ||
} | ||
|