diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2025-02-04 19:04:18 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2025-02-04 19:04:18 +0100 |
commit | 794335cf16b3c522b09b10dc5fb02c9554084f8a (patch) | |
tree | e1947e5dcd4f3b4dbdab1beacf7a66a577b06690 /src/task_so.cc | |
parent | f4b6372c1fe8d48aceb853272e0b822b967a56d7 (diff) |
Add support for custom flags through env: CFLAGS, CXXFLAGS and LDFLAGS
Diffstat (limited to 'src/task_so.cc')
-rw-r--r-- | src/task_so.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/task_so.cc b/src/task_so.cc index c98e4a7..92aeefe 100644 --- a/src/task_so.cc +++ b/src/task_so.cc @@ -116,6 +116,11 @@ int TaskSO::runInner() auto tool = compiler(); const auto& cfg = ctor::get_configuration(); + auto ldflags = cfg.getenv("LDFLAGS"); + if(!ldflags.empty()) + { + append(args, ld_option(toolchain, ctor::ld_opt::custom, ldflags)); + } auto res = execute(settings, tool, args, cfg.env); if(res != 0) { |