How to use SantizerCoverage during AOSP compilation? - android-source

My working environment is AOSP6.0.
I was hoping for some detailed instructions,
such as What do I need to do in Android.mk?
or How can the custom __sanitizer_cov_trace_pc_guard_init and __sanitizer_cov_trace_pc_guard functions be passed to the Android build system so that it can be used when piling?
thank you every one !

Related

How do I set the Program type?

I'm getting "ERROR: Targets with a unique build environment cannot be built in an installed engine.". This happens even when I build a new blank C++ project and make one specific change.
Inside of MyProject.Target.cs, I change the Type to Program, like so.
Type = TargetType.Program;
After changing that, anytime I try to build, clean, or generate visual studio files I get the error. The error doesn’t happen if I use TargetType.Game. However, I need to use Program so that I can build as a DLL using “bShouldCompileAsDLL = true;“ as documented on (https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/BuildAsALibrary/).
I’m running Unreal Engine 4.27. I need to set the type to Program instead.
Can anyone please help?
You can build it to dll with Game target.
Set both of these envs:
LinkType = TargetLinkType.Monolithic;
bShouldCompileAsDLL = true;

How to generate flutter code before every build

I'd like to have the output of some git describe call available inside my flutter app. It's important that this is run automatically before builds triggered by i.e. flutter run or flutter build apk. If I have to remember running a command manually before rebuilding the app in my IDE I won't get an accurate version number in the app.
I looked at https://pub.dev/packages/build_runner but that seems to require to always invoke it manually.
I also looked at --dart-define but through this I can just pass values into dart code but I also need a way to automatically update that value.
I did get this to work through gradle... but that is only invoked for android builds. Adding it additionally to the cmake layer would work... that still leaves web and iOS builds without a solution.
Anyone got an idea what I might be missing?
(flutter can already generate code for translations dynamically via the generate: true flag but this doesn't seem to be exposed through any way to add custom generation commands there?)

Error: register 'sp' unsuitable for global register variables on this target

I am playing around with a project for a STM32 µC. I use the SW4STM32 workbench and CubeMX on a Mac OSX system. My project itself is fine, everything compiles accordingly and behaves on the device as expected.
For a further learning purpose, I would like to implement unit tests using the CppuUTest framework. I have set up everything, got my test directories and a makefile to configure the MakefileWorker variables in place.
However, when executing the Makefile, I keep getting the error:
error:
register 'sp' unsuitable for global register variables on this target
This error originates from the file syscalls.c (which is a file generated by CubeMX). The line causing the error is:
register char * stack_ptr asm("sp");
After doing my research, it seems like there is no easy workaround to solve the issue. The source code is generated by Cube and works fine when compiling with the sw4stm32 toolchain (which is using a mcu gcc compiler).
However, the CppUTest toolchain is using clang, which cannot cope with global register variables (as the error says aswell).
My question here ist:
Has anyone of you had the same error yet or more experience in setting up CppUTest for a sw4stm32 project on an OSx system? Does anyone have an idea how to solve this problem?
If you need more information / code snippets from me, I will gladly share it.
Thank you very much guys! Any help would be highly appreciated :-)
Cheers,
Tobi

What are the steps to package and release VS Code?

I am trying to figure out how to package an unchanged fork of VS Code.
My first steps were to follow the electron application distubution documentation, which has not been successful. I also found this post, where another user had the same question. However, the vscode-win32 gulp task seems to have been replaced by x64 and ia32 versions, and when I try running these tasks they generate an out-vscode folder as opposed to a full electron project.
This led me to believe that I can use this new out folder (as well as node modules, packages.json, etc.) with the electron release being used by VS Code to mimic the resources/app folder from the installed version of VS Code in Program Files, however when I try running electron.exe using this method I get:
The factory method of "vs/code/electron-main/main" has thrown an exception TypeError: Path must be a string. Received undefined
In short, I have been struggling with this for a couple of days, and I am out of ideas. If anyone has packaged the project and can offer a suggestion for how to do so, I would really appreciate it.
SOLVED
The issue seemed to be due to being branched off of master as opposed to release. I'd assume there are changes in main that aren't accounted for in the gulp task.
For anyone confused by my post, the expected behavior for a successful build is for a folder named VSCode-win32-x64 to be generated in the directory where your vscode clone is located.

DllNotFoundException: libgfxunity3d

I'm new to unity and I am trying to use a plugin named Scaleform and I'm following the steps indicated in readme file, I've created a new project, imported the plugin, selected Main Camera object and attached the specified script to it, but when I want to play, I get this error:
DllNotFoundException: libgfxunity3d
SFCamera.OnDestroy () (at Assets/Plugins/SF/SFCamera.cs:163)
I googled and all I got was this: http://forums.autodesk.com/t5/Scaleform-Unity-Development/dll-not-found-exception/td-p/4242779
I've downloaded and installed DirectX too, but still no change! :(
Does anyone know what should I do?
Thanks!
We also ran into this problem on Windows. Ultimately, reinstalling the DirectX runtime did fix it for us (the person who had the problem was missing the d3dx9_43.dll that the Scaleform dll depends on).
You might also check and make sure you have put the right key into the appropriate location in your inherited camera script. (In the example, I believe it is called MyCamera.cs.)
Finally, you should check that your build target matches the version of the Scaleform trial you have installed. If your Unity build setting is Android, for example, you need to have the Android runtime for Windows, not the Windows runtime proper.
I downloaded the Depends application from http://www.dependencywalker.com/ and loaded libgfxunity3d.dll. I was missing msvcr100.dll, IEShims.dll and wer.dll. I threw those dlls into the System32 directory and my program ran great. Hope this helps!