[all-commits] [llvm/llvm-project] 934f79: [clang] Add support for SerenityOS (#187941)
Lucas Chollet via All-commits
all-commits at lists.llvm.org
Tue Apr 14 10:04:45 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 934f795064ab201553945c59b13ce2ae543d4fcd
https://github.com/llvm/llvm-project/commit/934f795064ab201553945c59b13ce2ae543d4fcd
Author: Lucas Chollet <lucas.chollet at serenityos.org>
Date: 2026-04-14 (Tue, 14 Apr 2026)
Changed paths:
M clang/lib/Basic/Targets.cpp
M clang/lib/Basic/Targets/OSTargets.h
M clang/lib/Driver/CMakeLists.txt
M clang/lib/Driver/Driver.cpp
M clang/lib/Driver/ToolChain.cpp
A clang/lib/Driver/ToolChains/Serenity.cpp
A clang/lib/Driver/ToolChains/Serenity.h
M clang/lib/Lex/InitHeaderSearch.cpp
A clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/aarch64-unknown-serenity/clang_rt.crtbegin.o
A clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/aarch64-unknown-serenity/clang_rt.crtend.o
A clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/riscv64-unknown-serenity/clang_rt.crtbegin.o
A clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/riscv64-unknown-serenity/clang_rt.crtend.o
A clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/x86_64-unknown-serenity/clang_rt.crtbegin.o
A clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/x86_64-unknown-serenity/clang_rt.crtend.o
A clang/test/Driver/Inputs/serenity_tree/usr/include/c++/v1/.keep
A clang/test/Driver/Inputs/serenity_tree/usr/lib/crt0.o
A clang/test/Driver/serenity.cpp
A clang/test/Preprocessor/init-serenityos.c
Log Message:
-----------
[clang] Add support for SerenityOS (#187941)
Adds support for the $arch-unknown-serenity target to the Clang front
end. This makes the compiler look for libraries and headers in the right
places, and enables some security mitigations like stack-smashing
protection and position-independent code by default.
----
A first attempt at upstreaming this patch was made
[here](https://reviews.llvm.org/D154396). I hope I fixed everything
mentioned there.
I intentionally kept `/usr/local/` in the default lookup path. I
consider it the more practical option, and I’d prefer to have the patch
merged as is and revisit the FIXME later. If this is absolutely
unacceptable to the maintainers, I will happily drop it and keep it as a
local patch until we address the underlying issue.
@MaskRay, @brad0 as you already reviewed the original patch.
---------
Co-authored-by: Daniel Bertalan <dani at danielbertalan.dev>
Co-authored-by: kleines Filmröllchen <filmroellchen at serenityos.org>
Co-authored-by: Andrew Kaster <akaster at serenityos.org>
Co-authored-by: Dan Klishch <danilklishch at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list