projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9a5b75e
)
[runtime] Fix tracking of dedup module in mkbundle
author
Alexander Kyte
<alkyte@microsoft.com>
Mon, 7 Aug 2017 21:25:52 +0000
(17:25 -0400)
committer
Alexander Kyte
<alexmkyte@gmail.com>
Wed, 30 Aug 2017 16:55:24 +0000
(12:55 -0400)
mcs/tools/mkbundle/mkbundle.cs
patch
|
blob
|
history
diff --git
a/mcs/tools/mkbundle/mkbundle.cs
b/mcs/tools/mkbundle/mkbundle.cs
index 9802735a5b812a4cf2adaf7d4ef33d8191d8695a..fe7121c470239a841e604852947b6a36121a60a5 100755
(executable)
--- a/
mcs/tools/mkbundle/mkbundle.cs
+++ b/
mcs/tools/mkbundle/mkbundle.cs
@@
-83,7
+83,7
@@
class MakeBundle {
static DirectoryInfo aot_temp_dir = null;
static string aot_mode = "";
static string aot_runtime = null;
static DirectoryInfo aot_temp_dir = null;
static string aot_mode = "";
static string aot_runtime = null;
- static
int?
aot_dedup_assembly = null;
+ static
string
aot_dedup_assembly = null;
static string cil_strip_path = null;
static string managed_linker_path = null;
static string sdk_path = null;
static string cil_strip_path = null;
static string managed_linker_path = null;
static string sdk_path = null;
@@
-409,9
+409,12
@@
class MakeBundle {
Console.WriteLine ("Usage: --aot-dedup <container_dll> ");
return 1;
}
Console.WriteLine ("Usage: --aot-dedup <container_dll> ");
return 1;
}
- var dedup_file = args [++i];
- sources.Add (dedup_file);
- aot_dedup_assembly = sources.Count () - 1;
+ var rel_path = args [++i];
+ var asm = LoadAssembly (rel_path);
+ if (asm != null)
+ aot_dedup_assembly = new Uri(asm.CodeBase).LocalPath;
+
+ sources.Add (rel_path);
aot_compile = true;
static_link = true;
break;
aot_compile = true;
static_link = true;
break;
@@
-1516,26
+1519,25
@@
void mono_register_config_for_assembly (const char* assembly_name, cons
Console.WriteLine ("Aoting files:");
for (int i=0; i < files.Count; i++) {
Console.WriteLine ("Aoting files:");
for (int i=0; i < files.Count; i++) {
- var file
N
ame = files [i];
- string path = LocateFile (new Uri (file
N
ame).LocalPath);
+ var file
_n
ame = files [i];
+ string path = LocateFile (new Uri (file
_n
ame).LocalPath);
string outPath = String.Format ("{0}.aot_out", path);
aot_paths.Add (outPath);
var name = System.Reflection.Assembly.LoadFrom(path).GetName().Name;
aot_names.Add (EncodeAotSymbol (name));
string outPath = String.Format ("{0}.aot_out", path);
aot_paths.Add (outPath);
var name = System.Reflection.Assembly.LoadFrom(path).GetName().Name;
aot_names.Add (EncodeAotSymbol (name));
- if (aot_dedup_assembly != null
&& i != (int) aot_dedup_assembly
) {
+ if (aot_dedup_assembly != null) {
all_assemblies.Append (path);
all_assemblies.Append (" ");
all_assemblies.Append (path);
all_assemblies.Append (" ");
- Execute (String.Format ("MONO_PATH={
6} {0} --aot={1},outfile={2}{3}{4} {5
}",
-
aot_runtime, aot_args, outPath, aot_mode_string, dedup_mode_string, path, Path.GetDirectoryName (path)
));
+ Execute (String.Format ("MONO_PATH={
0} {1} --aot={2},outfile={3}{4}{5} {6
}",
+
Path.GetDirectoryName (path), aot_runtime, aot_args, outPath, aot_mode_string, dedup_mode_string, path
));
} else {
} else {
- Execute (String.Format ("MONO_PATH={
5} {0} --aot={1},outfile={2}{3} {4
}",
-
aot_runtime, aot_args, outPath, aot_mode_string, path, Path.GetDirectoryName (path)
));
+ Execute (String.Format ("MONO_PATH={
0} {1} --aot={2},outfile={3}{4} {5
}",
+
Path.GetDirectoryName (path), aot_runtime, aot_args, outPath, aot_mode_string, path
));
}
}
if (aot_dedup_assembly != null) {
}
}
if (aot_dedup_assembly != null) {
- string fileName = files [(int) aot_dedup_assembly];
- var filePath = new Uri (fileName).LocalPath;
+ var filePath = new Uri (aot_dedup_assembly).LocalPath;
string path = LocateFile (filePath);
dedup_mode_string = String.Format (",dedup-include={0}", Path.GetFileName(filePath));
string outPath = String.Format ("{0}.aot_out", path);
string path = LocateFile (filePath);
dedup_mode_string = String.Format (",dedup-include={0}", Path.GetFileName(filePath));
string outPath = String.Format ("{0}.aot_out", path);
@@
-1545,8
+1547,8
@@
void mono_register_config_for_assembly (const char* assembly_name, cons
if ((aot_mode == "full" || aot_mode == "llvmonly") && cil_strip_path != null) {
for (int i=0; i < files.Count; i++) {
if ((aot_mode == "full" || aot_mode == "llvmonly") && cil_strip_path != null) {
for (int i=0; i < files.Count; i++) {
- var in
N
ame = new Uri (files [i]).LocalPath;
- var cmd = String.Format ("{0} {1} {2}", aot_runtime, cil_strip_path, in
N
ame);
+ var in
_n
ame = new Uri (files [i]).LocalPath;
+ var cmd = String.Format ("{0} {1} {2}", aot_runtime, cil_strip_path, in
_n
ame);
Execute (cmd);
}
}
Execute (cmd);
}
}
@@
-1596,10
+1598,10
@@
void mono_register_config_for_assembly (const char* assembly_name, cons
// Fix file references
for (int i=0; i < files.Count; i++) {
// Fix file references
for (int i=0; i < files.Count; i++) {
- var in
N
ame = new Uri (files [i]).LocalPath;
- var out
Name = Path.Combine (temp_dir_name, Path.GetFileName (inN
ame));
- File.Copy (in
Name, outN
ame);
- files [i] = out
N
ame;
+ var in
_n
ame = new Uri (files [i]).LocalPath;
+ var out
_name = Path.Combine (temp_dir_name, Path.GetFileName (in_n
ame));
+ File.Copy (in
_name, out_n
ame);
+ files [i] = out
_n
ame;
if (in_name == aot_dedup_assembly)
aot_dedup_assembly = out_name;
}
if (in_name == aot_dedup_assembly)
aot_dedup_assembly = out_name;
}