# Add flags when cross-compile Linux from Windows

**URL:** <https://forums.unrealengine.com/t/add-flags-when-cross-compile-linux-from-windows/454264>\
**Category:** Platform & Builds\
**Tags:** windows, Linux, unreal-engine, Plugins, UE4, question\
**Created:** [August 22, 2019, 7:21pm UTC](https://forums.unrealengine.com/t/add-flags-when-cross-compile-linux-from-windows/454264 "2019-08-22T19:21:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Brandon.Schaefer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Brandon.Schaefer](https://forums.unrealengine.com/u/Brandon.Schaefer)\
**Post date:** [August 22, 2019, 7:55pm UTC](https://forums.unrealengine.com/t/add-flags-when-cross-compile-linux-from-windows/454264/2 "2019-08-22T19:55:51Z")

</div>

Hello,

Yes theres no great way to add custom linker arg, the only way would be to change this file:

```
Engine/Source/Programs/UnrealBuildTool/Platform/Linux/LinuxToolChain.cs

```

And in this function:

```
protected virtual string GetLinkArguments(LinkEnvironment LinkEnvironment)

```

Add this somewhere along with the other linker flags:

```
results += " -Wl,--copy-dt-needed-entries";
```

---

_[View the full topic](https://forums.unrealengine.com/t/add-flags-when-cross-compile-linux-from-windows/454264)._
