Skip to content

Add the hardenaslr setting - #2825

Open
Rinzii wants to merge 1 commit into
premake:masterfrom
Rinzii:ian/hardenaslr
Open

Rinzii wants to merge 1 commit into
premake:masterfrom
Rinzii:ian/hardenaslr

Conversation

@Rinzii

@Rinzii Rinzii commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Implements the ASLR portion of #2569.

How does this PR change Premake's behavior?

Adds hardenaslr with Default, On, and Off modes for C and C++.

Anything else we should know?

Source tests and docs-check pass.

A library with hardenaslr "On" and pic "On" gets -fPIC from both settings. This includes Linux shared libraries since they default to pic "On".

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

Comment thread modules/vstudio/vs200x_vcproj.lua Resolved
Comment thread modules/vstudio/vs200x_vcproj.lua Resolved
Comment thread tests/tools/test_clang.lua Resolved
Comment thread website/docs/hardenaslr.md Resolved
Comment thread website/docs/hardenaslr.md Resolved
Comment thread website/docs/hardenaslr.md Resolved
Comment thread website/docs/hardenaslr.md Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants