Closed thejustinwalsh closed 4 years ago
Is there a reason why it is necessary to declare an unused variable?
On Linux when compiling with the bundled clang toolset unused-return warnings return as errors. UE4 doesn't provide a macro for unused-return and I did not want to sprinkle in clang specific pragmas to suppress it. What would be the preferred solution here. Without ret0, ret1, amd ret, the source code fails to compile.
Fixed.
The link above is indeed that warning / error I was seeing. Thanks!
As of Unreal 4.21 you must explicitly declare your PCH file, and as of 4.24 you need to configure a few flags in the modules build.cs in order to use PCH files as well as suppress shadow variable warnings. This commit includes those changes to the V8.Build.cs to ensure that the V8PCH.h file is used when compiling the V8 module.
Additionally, I was unable to suppress the -Wunused-return warning as error so changes where made to store the return value in those cases.
Finally,
FExportedStructMemoryInfo
would throw an error detailing how the copy constructor was deleted, so I removed the attempt to default it. It appears as if the Global context in v8 is a move only type so removing the copy constructor suppress the error.Until issue #53 is resolved I am unable to link, however all of these changes allow me to compile on Linux against 4.24.1.