Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NativeAOT SuperPMI collections #91037

Merged
merged 37 commits into from
Sep 11, 2023
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3e789e8
Initial superpmi.py work for nativeaot collections
TIHan Aug 22, 2023
40d8321
SPMI: Fix recording/replay of getExactClasses
jakobbotsch Aug 22, 2023
5ac1332
Feedback
jakobbotsch Aug 22, 2023
a10acf2
Merge remote-tracking branch 'jakob/fix-spmi-GetExactClasses' into na…
TIHan Aug 23, 2023
a820e8e
Use ilc-published
TIHan Aug 23, 2023
1ce9633
Merge branch 'nativeaot-collections' into nativeaot-collections-with-…
TIHan Aug 23, 2023
7666b20
Path fixes
TIHan Aug 23, 2023
80091e8
Merge branch 'nativeaot-collections' into nativeaot-collections-with-…
TIHan Aug 23, 2023
3a63fbb
Will this work?
TIHan Aug 23, 2023
9ee9f24
Copy ilc-published and aotsdk to Core_Root. Update superpmi.py to ref…
TIHan Aug 24, 2023
345135f
Change yml
TIHan Aug 25, 2023
45a10a2
Trying to add smoke_tests
TIHan Aug 25, 2023
64d7bd5
Building nativeaot tests in superpmi collect setup
TIHan Aug 26, 2023
432dc35
Do not check input_directory on nativeaot
TIHan Aug 26, 2023
6f2f731
Exclude native folder
TIHan Aug 26, 2023
ad12d8c
Using .ilc.rsp files for superpmi.py nativeaot
TIHan Aug 26, 2023
70a695d
Fix input directory
TIHan Aug 26, 2023
4315567
Making a copy of the rsp file
TIHan Aug 26, 2023
213cc4f
Fixing up references. Fixed architecture switch.
TIHan Aug 28, 2023
20d9c58
Fixing pinvokelist
TIHan Aug 28, 2023
19be152
Fix build
TIHan Aug 28, 2023
65be2c8
Cleanup. Stop overloading -assemblies to include ilc.rsp files, creat…
TIHan Aug 29, 2023
902c37b
Use paren
TIHan Aug 29, 2023
f12e59b
Let us try to skipnative since CI linux does not like the CLR test co…
TIHan Aug 29, 2023
1b9c698
Revert skipnative
TIHan Aug 30, 2023
f8a3c77
Build only smoketests, which skips the CustomMain native build. Fixup…
TIHan Sep 2, 2023
9e7a959
Merge branch 'main' into nativeaot-collections-with-jakob-fix
TIHan Sep 2, 2023
2f48356
Revert skipnative again...
TIHan Sep 2, 2023
81be4e2
Merge remote-tracking branch 'upstream/main' into nativeaot-collectio…
TIHan Sep 6, 2023
36e4d9e
Fix linux path
TIHan Sep 6, 2023
2b6bdeb
Add so.1 extension
TIHan Sep 6, 2023
3534f80
Feedback. Fix pmi libraries collections
TIHan Sep 7, 2023
62ab033
Include more file extensions for superpmi collections
TIHan Sep 7, 2023
e2cfc91
Fix yml
TIHan Sep 7, 2023
22a3d10
Fix-up more file paths that are located within the test's directories
TIHan Sep 8, 2023
f228db9
Fix paths again
TIHan Sep 8, 2023
3942328
Remove version
TIHan Sep 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Making a copy of the rsp file
  • Loading branch information
TIHan committed Aug 26, 2023
commit 4315567df00ba5e62d9e97b8d51be0241ad0c0fa
14 changes: 8 additions & 6 deletions src/coreclr/scripts/superpmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,8 +1122,13 @@ async def run_crossgen2(print_prefix, assembly, self):
if self.coreclr_args.nativeaot is True:
logging.debug("Starting collection using nativeaot")

async def run_nativeaot(print_prefix, rsp_filepath, self):
rsp_filepath = assembly
async def run_nativeaot(print_prefix, original_rsp_filepath, self):
if not original_rsp_filepath.endswith(".ilc.rsp"):
raise RuntimeError(f"Expected a '.ilc.rsp' file for nativeaot, but got {original_rsp_filepath}")

rsp_filepath = os.path.join(self.temp_location, make_safe_filename("nativeaot_" + original_rsp_filepath) + ".rsp")
TIHan marked this conversation as resolved.
Show resolved Hide resolved
shutil.copyfile(original_rsp_filepath, rsp_filepath)

with open(rsp_filepath, "a") as rsp_write_handle:
rsp_write_handle.write("--jitpath:" + os.path.join(self.core_root, self.collection_shim_name) + "\n")
for var, value in dotnet_env.items():
Expand All @@ -1138,11 +1143,8 @@ async def run_nativeaot(print_prefix, rsp_filepath, self):

begin_time = datetime.datetime.now()

root_output_filename = assembly
root_output_filename = rsp_filepath

# Save the stdout and stderr to files, so we can see if nativeaot wrote any interesting messages.
# Use the name of the assembly as the basename of the file. mkstemp() will ensure the file
# is unique.
try:
stdout_file_handle, stdout_filepath = tempfile.mkstemp(suffix=".stdout", prefix=root_output_filename, dir=self.temp_location)
stderr_file_handle, stderr_filepath = tempfile.mkstemp(suffix=".stderr", prefix=root_output_filename, dir=self.temp_location)
Expand Down