Some things seem to be working now! Below I've reported on which things still are and aren't working in command prompt and the native tools command prompt separately
Command prompt
swift build of a basic executable package:
warning: Failed creating default cache locations, Error Domain=NSCocoaErrorDomain Code=256 "(null)"
warning: Failed creating default cache locations, Error Domain=NSCocoaErrorDomain Code=256 "(null)"
The system cannot find the path specified.
[0/0] Build complete!
warning: unable to create symbolic link at C:\Users\stackotter\Documents\Swift\HelloWorld\.build\debug: Error Domain=NSCocoaErrorDomain Code=256 "(null)"
swiftc test.swift where test.swift is a program that prints hello world:
clang: error: no such file or directory: 'C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\lib\swift\windows\x86_64\swiftrt.obj'
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
repl:
1> print("Hello, world!")
Assertion failed: false && "called into swift language runtime stub", file D:\a\1\s\llvm-project\lldb\source\Plugins\LanguageRuntime\Swift\SwiftLanguageRuntime.cpp, line 368
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
#0 0x00007ff63664e5d5 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\lldb.exe+0x1e5d5)
#1 0x00007ff80760caad (C:\WINDOWS\System32\ucrtbase.dll+0x6caad)
#2 0x00007ff80760dab1 (C:\WINDOWS\System32\ucrtbase.dll+0x6dab1)
#3 0x00007ff80760f4ee (C:\WINDOWS\System32\ucrtbase.dll+0x6f4ee)
#4 0x00007ff80760f3e5 (C:\WINDOWS\System32\ucrtbase.dll+0x6f3e5)
#5 0x00007ff80760f771 (C:\WINDOWS\System32\ucrtbase.dll+0x6f771)
#6 0x00007fff8ba3556c PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x82556c)
#7 0x00007fff90627774 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x5417774)
#8 0x00007fff9062cff3 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x541cff3)
#9 0x00007fff9062a6e8 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x541a6e8)
#10 0x00007fff90624b36 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x5414b36)
#11 0x00007fff8b75e4a3 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x54e4a3)
#12 0x00007fff8b76ca9b PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x55ca9b)
#13 0x00007fff8b73ac46 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x52ac46)
#14 0x00007fff8b6e960a PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x4d960a)
#15 0x00007fff8b6e832e PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x4d832e)
#16 0x00007ff8075c10b2 (C:\WINDOWS\System32\ucrtbase.dll+0x210b2)
#17 0x00007ff808d87c24 (C:\WINDOWS\System32\KERNEL32.DLL+0x17c24)
#18 0x00007ff80a14d721 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x6d721)
Native tools command prompt
swift run of a basic executable package (it works!!):
warning: Failed creating default cache locations, Error Domain=NSCocoaErrorDomain Code=256 "(null)"
warning: Failed creating default cache locations, Error Domain=NSCocoaErrorDomain Code=256 "(null)"
[1/1] Planning build
The system cannot find the path specified.
[0/0] Build complete!
warning: unable to create symbolic link at C:\Users\stackotter\Documents\Swift\HelloWorld\.build\debug: Error Domain=NSCocoaErrorDomain Code=256 "(null)"
Hello, world!
swiftc test.swift where test.swift is a program that prints hello world:
clang: error: no such file or directory: 'C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\lib\swift\windows\x86_64\swiftrt.obj'
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
repl:
1> print("Hello")
Assertion failed: false && "called into swift language runtime stub", file D:\a\1\s\llvm-project\lldb\source\Plugins\LanguageRuntime\Swift\SwiftLanguageRuntime.cpp, line 368
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
#0 0x00007ff63664e5d5 (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\lldb.exe+0x1e5d5)
#1 0x00007ff80760caad (C:\WINDOWS\System32\ucrtbase.dll+0x6caad)
#2 0x00007ff80760dab1 (C:\WINDOWS\System32\ucrtbase.dll+0x6dab1)
#3 0x00007ff80760f4ee (C:\WINDOWS\System32\ucrtbase.dll+0x6f4ee)
#4 0x00007ff80760f3e5 (C:\WINDOWS\System32\ucrtbase.dll+0x6f3e5)
#5 0x00007ff80760f771 (C:\WINDOWS\System32\ucrtbase.dll+0x6f771)
#6 0x00007fff8ba3556c PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x82556c)
#7 0x00007fff90627774 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x5417774)
#8 0x00007fff9062cff3 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x541cff3)
#9 0x00007fff9062a6e8 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x541a6e8)
#10 0x00007fff90624b36 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x5414b36)
#11 0x00007fff8b75e4a3 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x54e4a3)
#12 0x00007fff8b76ca9b PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x55ca9b)
#13 0x00007fff8b73ac46 PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x52ac46)
#14 0x00007fff8b6e960a PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x4d960a)
#15 0x00007fff8b6e832e PyInit__lldb (C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\liblldb.dll+0x4d832e)
#16 0x00007ff8075c10b2 (C:\WINDOWS\System32\ucrtbase.dll+0x210b2)
#17 0x00007ff808d87c24 (C:\WINDOWS\System32\KERNEL32.DLL+0x17c24)
#18 0x00007ff80a14d721 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x6d721)
Installing support files
I noticed that there is a section in the installation instructions that claims it is not necessary for Swift versions after 5.4.2, however, after following them swift build now works in the regular command prompt as well.
It seems like Swift 5.5.3 still only works if it is used from the native tools command prompt or the support files are copied. Well, by works I mean that swift build works. swiftc doesn't seem to work either way.
Conclusion
It's great that I can finally build swift packages now, I don't really know why that didn't work in the first place, the visual studio installer must've done something weird (because native tools wasn't there at all).
However, swiftc still doesn't work (and neither does the repl but I don't really care about that).