1*412f47f9SXin LiGENERIC CONTRIBUTION GUIDELINES 2*412f47f9SXin Li=============================== 3*412f47f9SXin Li 4*412f47f9SXin Li1. Sub-projects are maintained independently and thus have independent 5*412f47f9SXin Li contribution rules. If there exists a README.contributors in the 6*412f47f9SXin Li sub-directory to which the contribution is made, it must be followed. 7*412f47f9SXin Li 8*412f47f9SXin Li2. Legal: 9*412f47f9SXin Li - Contributors who are not employed by Arm must sign an Assignment Agreement. 10*412f47f9SXin Li See contributor-agreement.pdf. 11*412f47f9SXin Li - All code must be copyright owned by Arm Limited and the appropriate 12*412f47f9SXin Li copyright notice and license identifier must be present in every source 13*412f47f9SXin Li file. 14*412f47f9SXin Li 15*412f47f9SXin Li3. Build: 16*412f47f9SXin Li - Build should only depend on GNU make and posix utilities (shell, awk, sed, 17*412f47f9SXin Li etc) and on a C toolchain. 18*412f47f9SXin Li - Build should pass with the default configuration (see config.mk.dist) 19*412f47f9SXin Li and other supported configurations, with both gcc and clang based 20*412f47f9SXin Li toolchains. (The build should not depend on a recent toolchain, the use 21*412f47f9SXin Li of a new feature should be possible to disable.) 22*412f47f9SXin Li - Currently there is no automated configuration, target specific configuration 23*412f47f9SXin Li should be done via make variables in config.mk. This is the user interface 24*412f47f9SXin Li to the build system, so it should be documented in sufficient detail and 25*412f47f9SXin Li kept reasonably stable. 26*412f47f9SXin Li 27*412f47f9SXin Li4. Testing: 28*412f47f9SXin Li - On aarch64 the tests must pass. If the code may behave differently under 29*412f47f9SXin Li some supported configurations (e.g. CFLAGS) those should be tested. 30*412f47f9SXin Li - New symbols are expected to have new associated test code and ideally 31*412f47f9SXin Li benchmark code too. 32*412f47f9SXin Li 33*412f47f9SXin Li4. Commits: 34*412f47f9SXin Li - Commit message should be descriptive and should not refer to Arm internal 35*412f47f9SXin Li information (such as Jira tickets, or internal discussions). Non-obvious 36*412f47f9SXin Li decisions should be recorded or explained in the commit message if they are 37*412f47f9SXin Li not explained in source comments. 38*412f47f9SXin Li - Ideally tools and scripts used to write the code should be added to the 39*412f47f9SXin Li repository or at least mentioned in the commit. 40*412f47f9SXin Li - Logically independent changes should not be mixed into the same commit. 41*412f47f9SXin Li 42*412f47f9SXin Li5. Style: 43*412f47f9SXin Li - Unless otherwise required differently by the sub-project, follow the 44*412f47f9SXin Li clang-format tool using the style from the gcc contrib/ directory. 45