compiler-flags

How to disable scaling the UI on Windows, for Java 9 applications?

五迷三道 提交于 2019-11-30 05:28:40
问题 There was no proper HiDPI support in Java 8. In Java 9 , JavaFx applications correctly scale to the monitor they are in. For example, if my monitor is set to scale at 150%, the Java application is scaled to 150%. See: http://openjdk.java.net/jeps/263 However, for testing purposes, I need to be able to disable scaling by using java.exe flags , in Windows 10. How can I achieve this? Also, maybe I can disable (and re-enable) this programmatically within the application itself? 回答1: I found this

Make: Override a flag

独自空忆成欢 提交于 2019-11-29 22:59:34
问题 I was a little confused with the responses to Quick way to override -Werror flag? So I ask my specific question here. I have multiple Makefiles working together and CFLAGS has been set along the way to (-Werror -Wall .. and many others) But in one of the Makefiles, I wish that the errors not be treated as warnings and so I would like to remove -Werror flag. What would be the best way to achieve this, so that only for this Makefile, -Werror flag is removed and for the others normal execution

Using compiler variables in Swift

吃可爱长大的小学妹 提交于 2019-11-29 10:58:30
In Objective-C I had a bunch of compiler flags set in Build Settings -> Other C Flags that were being used in the code. For instance: Flag => -DPortNumber = 1 And in code I was able to access it by @(PortNumber) This doesn't work in Swift, and I'm not able to find an answer. The -D flag to C compilers defines a preprocessor macro. There are no preprocessor macros in Swift. So if you're looking to do something like: // compile with -DPORT_NUMBER 31337 var port = PORT_NUMBER // error ... you can't. Swift is designed for source code to be syntactically complete before compilation. If you could

Specific compiler flags for specific files in Xcode

混江龙づ霸主 提交于 2019-11-29 04:06:25
I've been tasked to work on a project that has some confusing attributes. The project is of the nature that it won't compile for the iPhone Simulator And the iPhone Device with the same compile settings. I think it has to do with needing to be specifically compiled for x86 or arm6/7 depending on the target platform. So the project's build settings, when viewed in Xcode's Build Settings view doesn't enable me to set specific compiler flags per specific files. However, the previous developer that worked on this project has somehow declared the line: CE7FEB5710F09234004DE356 /* MyFile.m in

Which compilation flags should I use to avoid run time errors

≯℡__Kan透↙ 提交于 2019-11-29 02:12:18
Just learned here that -Wsequence-point comiplation flag will pop a warning when the code can invoke UB. I tried it on a statement like int x = 1; int y = x+ ++x; and it worked very nicely. Until now I have compiled with gcc or g++ only using -ansi -pedantic -Wall . Do you have any other helpful flags to make the code more safe and robust? gsamaras As alk summed up, use these flags: -pedantic -Wall -Wextra -Wconversion First, I think you don't want to use the -ansi flag, as suggested in Should I use "-ansi" or explicit "-std=..." as compiler flags? Secondly, -Wextra seems to be quite useful

What's the “DNS_BLOCK_ASSERTIONS” (C compiler flag)?

a 夏天 提交于 2019-11-28 21:04:52
What's the "DNS_BLOCK_ASSERTIONS" (C compiler flag)? The NS_BLOCK_ASSERTIONS macro (no "D") suppresses the checks performed by NSAssert. You supply it to the compiler using -DNS_BLOCK_ASSERTIONS (see the comments for an explanation of the "D"). 来源: https://stackoverflow.com/questions/2752574/whats-the-dns-block-assertions-c-compiler-flag

GCC optimization flags for matrix/vector operations

痞子三分冷 提交于 2019-11-28 19:58:32
I am performing matrix operations using C. I would like to know what are the various compiler optimization flags to improve speed of execution of these matrix operations for double and int64 data - like Multiplication, Inverse, etc. I am not looking for hand optimized code, I just want to make the native code more faster using compiler flags and learn more about these flags. The flags that I have found so far which improve matrix code. -O3/O4 -funroll-loops -ffast-math First of all, I don't recommend using -ffast-math for the following reasons: It has been proved that the performance actually

What does CompileThreshold, Tier2CompileThreshold, Tier3CompileThreshold and Tier4CompileThreshold control?

丶灬走出姿态 提交于 2019-11-28 18:22:31
HotSpot's tiered compilation uses the interpreter until a threshold of invocations (for methods) or iterations (for loops) triggers a client compilation with self-profiling. The client compilation is used until another threshold of invocations or iterations triggers a server compilation. Printing HotSpot's flags shows the following flag values with -XX:+TieredCompilation. intx CompileThreshold = 10000 {pd product} intx Tier2CompileThreshold = 0 {product} intx Tier3CompileThreshold = 2000 {product} intx Tier4CompileThreshold = 15000 {product} There are too many flags for just a client and

gcc optimization flags for Xeon?

南楼画角 提交于 2019-11-28 16:41:38
I'd want your input which gcc compiler flags to use when optimizing for Xeons? There's no 'xeon' in mtune or march so which is the closest match? ShuggyCoUk Xeon is a marketing term, as such it covers a long list of processors with very different internals. If you meant the newer Nehalem processors (Core i7) then this slide indicates that as of 4.3.1 gcc should be use -march=generic (though your own testing of your own app may find other settings that outperform this). The 4.3 series also added -msse4.2 if you wish to optimize that aspect of FP maths. Here is some discussion comparing tuning

Variables optimized out with g++ and the -Og option

喜夏-厌秋 提交于 2019-11-28 13:17:01
When I compile my C++ program with g++ using the -Og option I see variables that are <optimized out> , and also the current line sometimes skips around. Is this behaviour expected at this optimization level, or do I have some problem? The man page of gcc says: -Og Optimize debugging experience. -Og enables optimizations that do not interfere with debugging. It should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience. hence I did not expect this behaviour.